Page 1 of 1

how do you kill people

PostPosted: Mon Jun 30, 2008 6:35 pm
by pdude1
I just got this thing yesterday and i am doing pretty good but i cant find out how to make it so when i jump on peoples heads they die or fall or dissapear so for now thats all i need to know
help me

Re: how do you kill people

PostPosted: Mon Jun 30, 2008 8:06 pm
by Thanx
Hey! Well these are your possibilities:
- In the on collision event, if you want the actor to disappear, then either set its transp to 1, and if you want him to restart from somewhere else, you'll only have to set his x and y, and reset transp to 0. You could also DestroyActor, which is good cause when you create him again, then also the On create event happens, which you might want to use...

Or you can say in the collision evet, to change animation - dieing animation, and in the AnimationFinish event of that animation do some of the above...

Have fun with GE! :wink:

Re: how do you kill people

PostPosted: Mon Jun 30, 2008 8:43 pm
by J Maker
or sometimes what i do is in the draw actor of enemy:
Code: Select all
if (canTransp == 1)
{
    transp += .05;
}

and in create a variable named: canTransp
then in create actor of enemy put:
Code: Select all
canTransp = 0;


then give the enemy a collision on bottom side of player:
Code: Select all
canTransp = 1;


the transp += makes him fade out to give him a cooler death than just vanishing in a split second.