Uh, what is happening, variable failure?

Non-platform specific questions.

Uh, what is happening, variable failure?

Postby Hblade » Wed Jan 19, 2011 6:55 pm

Now, if I'm not mistaken, it should work when you press Down..... but uh, somehow the variable TM is interfering with it... Im tyring to make a menu controlled by the joystick but uh, that for some reason doesn't work... My code:
Code: Select all
if (YAXIS>2000) {
    if (TM==0) {
        y+=32;
    TM=1; }
                }
if (YAXIS<-2000) {
    if (TM==0) {
        y-=32;
    TM=1; }
                           }

              }


When that code is placed, it doesnt move at all O__o I thought okay, maybe the TM variable is setting its self to 1, but turns out no, its actually 0... but when I make it this:
Code: Select all
if (YAXIS>2000) {
        y+=32;
                }
if (YAXIS<-2000) {
        y-=32;
                           }

              }


it works perfectly fine.. BUT! it constantly moves the selector. Which I understand that because they'res a constant repeat.

But uh, HOW DOES TM INTERFERE WITH IT LOL
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: Uh, what is happening, variable failure?

Postby Hblade » Wed Jan 19, 2011 7:01 pm

Fixed, the issue is that I had the "int TM" inside of the draw actor, which was causing it to somehow bug.
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: Uh, what is happening, variable failure?

Postby again » Wed Jan 19, 2011 8:11 pm

Yeah dont let it stress you just another game editor fart.
Free windows mobile games like doodle jump and super mario bros
http://krenisis.freeforums.org/
again
 
Posts: 258
Joined: Wed Jan 19, 2011 7:06 pm
Score: 33 Give a positive score

Re: Uh, what is happening, variable failure?

Postby Hblade » Wed Jan 19, 2011 8:35 pm

lol
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: Uh, what is happening, variable failure?

Postby lcl » Fri Jan 21, 2011 6:15 am

Hblade wrote:Fixed, the issue is that I had the "int TM" inside of the draw actor, which was causing it to somehow bug.

I think that happens because the code repeats and int TM or any other variable define like that makes it to be 0. I'm not sure but that's what I think.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest