Page 1 of 1

Moving

PostPosted: Mon Dec 31, 2007 11:57 am
by Azou
Hello!!! Okay,i've got a problem: when i'm doing a special attack,the cuurrent character is able to move,and to let away items sfx.How should i stop this? :D

Re: Moving

PostPosted: Mon Dec 31, 2007 1:09 pm
by j2graves
did you check the loop on the sfx?

Re: Moving

PostPosted: Mon Dec 31, 2007 3:10 pm
by Azou
No,but u didn't understand!!! If the cuurent character was for example eating,if i push keypad 7,he stops eating,aso that he were doing a special attack!!!! How can i do that once the special attack is activate,my character won't be able to move,to jump orto do something,until that the attack is finish?? :P

Re: Moving

PostPosted: Mon Dec 31, 2007 7:27 pm
by MrScience101
Try using EventDisable("ACTOR NAME", ALLEVENTS);

Re: Moving

PostPosted: Tue Jan 01, 2008 12:10 pm
by Azou
Okay!!! Thanx a lot! :mrgreen: But the problem is that it's a key up event.How can i do? :D

Re: Moving

PostPosted: Tue Jan 01, 2008 12:50 pm
by j2graves
try using a variable called "movable" and make it so that he can only move if movable = 1 and when he's doing the special attack that maovable = 0 and when it's finished that movable = 1 again.

Re: Moving

PostPosted: Wed Jan 02, 2008 11:17 am
by Azou
So on key for moving,i should write this
if (movable==1)
x = x + 3;
if(movable==0);
x = x + 0;
:D
Is it that?

Re: Moving

PostPosted: Wed Jan 02, 2008 11:36 am
by Fuzzy
Azou wrote:So on key for moving,i should write this
if (movable==1)
x = x + 3;
if(movable==0);
x = x + 0;
:D
Is it that?

Hey Azou, you can make that more simple.
Code: Select all
if (movable != 0)
{
x = x + 3;
}


!= means not equal.

Here is how I would do it though.

Code: Select all
x = x + 3*movable;


which makes it just one line. if movable is set to zero, then the actor will not move.

Re: Moving

PostPosted: Wed Jan 02, 2008 3:07 pm
by j2graves
Oh, I didn't know about the ! thanx!

Re: Moving

PostPosted: Thu Jan 03, 2008 3:52 pm
by Bee-Ant
Fuzzy wrote:which makes it just one line

Excellent :D