Moving

Non-platform specific questions.

Moving

Postby Azou » Mon Dec 31, 2007 11:57 am

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
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Moving

Postby j2graves » Mon Dec 31, 2007 1:09 pm

did you check the loop on the sfx?
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: Moving

Postby Azou » Mon Dec 31, 2007 3:10 pm

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
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Moving

Postby MrScience101 » Mon Dec 31, 2007 7:27 pm

Try using EventDisable("ACTOR NAME", ALLEVENTS);
User avatar
MrScience101
 
Posts: 115
Joined: Tue Mar 20, 2007 9:52 pm
Score: 13 Give a positive score

Re: Moving

Postby Azou » Tue Jan 01, 2008 12:10 pm

Okay!!! Thanx a lot! :mrgreen: But the problem is that it's a key up event.How can i do? :D
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Moving

Postby j2graves » Tue Jan 01, 2008 12:50 pm

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.
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: Moving

Postby Azou » Wed Jan 02, 2008 11:17 am

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?
User avatar
Azou
 
Posts: 514
Joined: Thu Sep 13, 2007 1:12 pm
Score: 35 Give a positive score

Re: Moving

Postby Fuzzy » Wed Jan 02, 2008 11:36 am

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.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Moving

Postby j2graves » Wed Jan 02, 2008 3:07 pm

Oh, I didn't know about the ! thanx!
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: Moving

Postby Bee-Ant » Thu Jan 03, 2008 3:52 pm

Fuzzy wrote:which makes it just one line

Excellent :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron