Need help, extremely confusing T0T FINALLY GOT IT =D

Non-platform specific questions.

Need help, extremely confusing T0T FINALLY GOT IT =D

Postby Hblade » Thu May 02, 2013 1:12 am

Ok guys this is driving me mad, when I load the map (everything loads fine) but the top layer has random tiles on it (from layer 2 which never even got placed yet)
Code: Select all
void LoadTiles()
{
    Actor*A;
    Actor*A2;
    char*tmp, *tmp2;
    int i;
    for(i=0;i<10000;i++)
    {
        sprintf(tmp, "Tiles.%d", i);
        sprintf(tmp2, "Events.%d", i);
        A=getclone(tmp);
        A->animpos=tAnim1[i];
        A2=getclone(tmp2);
        A2->animpos=tAnim2[i];
    }
}

This is the code that actually -changes- the tiles. Theres "Tiles" and "Events" which Events is layer 2, tAnim1[i] is the tile animation of the cloneindex of each "Tiles" actor, where as tAnim2 stores the "Events" animpos of the cloneindex. I don't understand whats going wrong, I looked in the Events layer and coppied EVERYTHING and even added If statements to determine which layer your on, I also changed tAnim1 to tAnim2 just like I should, and everything gets placed PERFECTLY FINE but when I load, oh god no it loads glitchy >_>

wtf.png


As seen in this screenshot, layer 2 doesn't get loaded properly but layer 1 is fine, again I coppied everything that involves layer ones code, and changed it to tAnim2 so it should effin' work but it doens't
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Need help, extremely confusing T0T

Postby skydereign » Thu May 02, 2013 3:24 am

Are you sure the values in the array are correct?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Need help, extremely confusing T0T

Postby Hblade » Thu May 02, 2013 4:14 am

No not sure on that at all, i'll check later and try to do a new for statement
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Need help, extremely confusing T0T *RIPPING HAIR OUT*

Postby Hblade » Fri May 03, 2013 5:38 pm

FINALLY FIXED! :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron