Making a dead animation for when the enemy dies..


That’s the question, how can I do that… and do that after the enemy plays the dead animation, how make an EditObject>EndObject, after the enemy plays the animation… 2,3 seconds, maybe?

Help please! I don’t even maked a dead animation… D:

Is it 2.6+? If so you could use the Timer property, start it at 5. When the character dies, set it to 0 and play the animation, when the timer reaches 3, end the object.

you could usa a delay sensor, on the character itself, he make the dying animation and go to state two, for example, on that stat you create a delay sensor linked to an and controller then to an edit object actuator( the end object on this case), the delay you can set to any time you want, for two seconds, without change any other of its cofiguration you could set the delay to about 90, the death animation ll be done on the first state as you had allready programed it and on the seccond it ll finish the object without problems.

What I did for More Than Duty was:

  • I duplicated the armature and the character mesh and moved them to a different layer.
  • Unparent the armature from the main character “control”
  • Made the copied armature play the death animation
  • And had the ACTUAL armature connected to the character “control” add the copied armature on death!

This method is good for collisions, because if you set the armature and main character mesh to “No-Collision” there will be no collision problems. Unlike the method where the character bounds (box probably) is still in the way.

That isnt heavy? double mesh and double armature ?

Well, my characters were under 1000 vertices. But when the enemy dies, one is deleted and the other spawns. and since the Character bound is deleted, there are no collision problems and it should actually help speed things up.

I’m following your example, but I have the timer property associated to the enemy armature, and the enemy armature is in the layer 3, but when I spawn the enemy from an empty the armature appears with the model and the enemy collision box, BUT the TIMER doesn’t play, it’s freezed for any reason!

you could use what I had said its the easiest way to make it in my oppinion.

I get this run, but I have a new problem, when the EditObject>EndObject executes… all the enemyes disappear, and I only want to disappear the only one I’m hitting!

Click on Make single user in the object menue and then in that menue click on object & data & material+tex.

Where is “make single user?”

Founded it, but I still have problems… anyone can search in my .blend file, and tell me what I’m doing wrong?

blend file:


If this works, I too thank you very much! :wink:

PLayer collision box duplicate three times then place them on layers by themselves and use add object actuator to add a unique one for all three emptys.Tell me if it solves your problem.

Man I just made that on my demo for you, that way when one dies all the others remain, you could just take a look on it and learn

Here it is done AGAIN now with a dead animation.


ZOMBIEEXAMPLE2.blend (1.32 MB)

Leon, that’s actually a fun game :wink:


Leonnn, can you explain me how it works? I’ve not played with States never :S

PD: Thanks for your help :slight_smile:

i copied midgard s game for tell you the truth, but thanks agoose.

Ok I ll explain the best I can.

I ll explain the zombie object first:

first it haves an allways sensor that is linked to a motion, a track to, and a message that regulates the ammount of spawing zombies, this I had explained allready on your thread.

then there is collision sensor, its quite simple in this case, when the bulllet that is shooted by the character that have the property shot on it hit the zombie, he goes to the state two, this mean that all the sensors and actuators from the state one are turned off and a new set of sensors and actuators will start working now.

you can see that there are several state layers on the controller row usually they are hided with a + sign, you can simple press it and the layers ll appear, then you can choose witch state you ll work with.

On the zombie case he colides with the shot and goes to the state two, now all the actions that ll fallow will be on the second state, and in order to see them and program it you have to open it, to do that just click over the second square right below the controlers part where it say visible then you ll be on the state two.

on state two you have two sensors one delay and one always, the always sensor sends the message to controll the zombie population, in this case it decrease the zombie population count, in this matter you dont exactly need the delay sensor, neither the state sensor, but somethimes due to loading and logic calculation of bge some things are skiped and may cause some problems so I make this way to dont have any problem.

Ok now the delay sensor, the delay sensor is there just to make shure that the message is sent before the object is ended, ok so after 2 ticks he add the head, and the body to make the death animation, and then it ends the original zombie.

All the other zobie parts, the head and the body, have just simple animations that make them turn and fade away, this part is very simple I dont think that it need more explaination about, but if you want I can help.

I think that after this last change it ll work only on the 2.62 or newer because the older versions have f-curve actuator that is used to play the animations that I had played on this demo.

I hope it helps you