Page 1 of 1

Uh, what is happening, variable failure?

PostPosted: Wed Jan 19, 2011 6:55 pm
by Hblade
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

Re: Uh, what is happening, variable failure?

PostPosted: Wed Jan 19, 2011 7:01 pm
by Hblade
Fixed, the issue is that I had the "int TM" inside of the draw actor, which was causing it to somehow bug.

Re: Uh, what is happening, variable failure?

PostPosted: Wed Jan 19, 2011 8:11 pm
by again
Yeah dont let it stress you just another game editor fart.

Re: Uh, what is happening, variable failure?

PostPosted: Wed Jan 19, 2011 8:35 pm
by Hblade
lol

Re: Uh, what is happening, variable failure?

PostPosted: Fri Jan 21, 2011 6:15 am
by lcl
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.