Page 1 of 1

How to make your actor slash tutorial

PostPosted: Wed Sep 08, 2010 8:37 pm
by zxcvbnm
Ok the controls are follows

Press spacebar to slash enemies that are comming at you . If you dont slash , then your actor gets destroyed.
Next post will be tutorial.

Re: How to make your actor slash tutorial

PostPosted: Wed Sep 08, 2010 8:50 pm
by zxcvbnm
Ok 1st we need 2 actors

hero ( 2 frames of animation , 1 when he slashes and 1 where he is not )
enemy

Then you need to declare 1 variable

hit

Now lets begin!!

Click on hero // click on keydown // click on spacebar// click on add action // click on script editor //

ChangeAnimation (" put your slashing animation here");
hit=1;

click immediate action

Ok now click on your hero // click keyup // click the spacebar // click add action // script editor //

ChangeAnimation(" put your standing still animation here");
hit=0;

Now for the last step of your hero

Click on hero // click on collision // on any side of // enemy // add action // script editor //

Code: Select all
if(hit==1)
{
DestroyActor("Collide Actor");
}


Click add action and now your almost done.

Re: How to make your actor slash tutorial

PostPosted: Wed Sep 08, 2010 8:55 pm
by zxcvbnm
Ok now for your enemy its simple

click on enemy // click on collision // on any side of // hero // add action // script editor //
Code: Select all
if(hit==0)
{
DestroyActor("hero")
}


Thats it your done !! if you have any questions feel free to ask.

Re: How to make your actor slash tutorial

PostPosted: Thu Sep 09, 2010 2:48 am
by NightOfHorror
Does this work by making weaker enemies die in one hit, but stronger enemies don't die in one, two, maybe three. or more. Boss's definetly can't just die in one hit. Thanks :)

Re: How to make your actor slash tutorial

PostPosted: Thu Sep 09, 2010 2:52 am
by zxcvbnm
This is the 1 hit code . Please practice this and get it down pat 1st. After you tell me you got this down pat , I will tell you how to add
hit points to the enemies. Did you start making the game already ? How is your progress ?

Re: How to make your actor slash tutorial

PostPosted: Thu Sep 09, 2010 12:19 pm
by lcl
Kren, this is actually the same thing as your make your actor punch tutorial...
This is just done better way, but you still can just hold spacebar and kill every enemy that comes... :?

You should make it just do one hit and then stop, so you can't just hold spacebar... :D
Nice work still. :D

Re: How to make your actor slash tutorial

PostPosted: Thu Sep 09, 2010 11:40 pm
by NightOfHorror
I do gotta agree, but sadly no I haven't :( The only reason is because I am working on a retro game for you. :)