Page 1 of 1

Item sfx

PostPosted: Sat Nov 10, 2007 1:26 pm
by Azou
HIII!!!!Well,i wanted to ask a question:how to make,when sangoku is punching,an animation appear? Like if he toa person,an animation appear??? :? :D

Re: Item sfx

PostPosted: Sat Nov 10, 2007 1:29 pm
by j2graves
you mean change animation? or do you mean create a new actor?

Re: Item sfx

PostPosted: Sat Nov 10, 2007 1:37 pm
by Azou
Hum...i mean to create an new actor!! :D

Re: Item sfx

PostPosted: Sat Nov 10, 2007 1:39 pm
by j2graves
is the punch from a key down event? if so, also make a "create actor" action when the key is pressed.

Re: Item sfx

PostPosted: Sat Nov 10, 2007 1:46 pm
by Azou
Okay,but even if the enemy is not touched,it will show the animation.How to make that it's only when the enemy is touched that it appears?, :D

Re: Item sfx

PostPosted: Sat Nov 10, 2007 1:56 pm
by j2graves
how about you add a variable like "touching" and add the event "collision" on "any side" of "the other guy" script editor:
Code: Select all
touching = 1;

and then add the "key down" event and write something like this in script editor:
Code: Select all
if touching = 1
{
create actor
touching = o;
}


if this dosn't work, let me know and I'll correct it. I still have to work on coding. but I just know that it is something like this!

Re: Item sfx

PostPosted: Sat Nov 10, 2007 1:58 pm
by Azou
I'll test it when i'll be at home!! Thanks you very much!! :D

Re: Item sfx

PostPosted: Sun Nov 11, 2007 6:04 pm
by j2graves
I've corrected it. I put _ _ _ where your actor's name will be.

Code: Select all
if (touching == 1)
{createactor _ _ _;
touching = 0;}

Re: Item sfx

PostPosted: Sun Nov 11, 2007 6:15 pm
by Azou
Okay!Thanks to you! :D :D