Can anybody give me an idea of how I could create a delay when Lerpz dies so that there is time to see him slump (as a ragdoll). I have looked for something like this in the forums, but found nothing.
I can just about figure out how to swap out the Lerpz mesh for a ragdoll version, but in the ‘die’ function in the status script, the level reloads instantly. How can I extend this to create more of a sequence?
It would be nice to animate the camera rotating around his body, or perhaps play a tragic jingle.
Seems like this should be pretty straight forward. I’ve looked at pretty much all of the tutorials, and for some reason this doesn’t seem to be covered.
If anyone can give me a hint, I would really appreciate it.
function Die() {
restartLevel();
}
function restartLevel() {
// do the actual restart
}
You could change it to:
function Die() {
InvokeRepeating("restartLevel", 5, 60); // call restartLevel in 5 seconds
}
function restartLevel() {
CancelInvoke("restartLevel");
// do the actual restart
}
This is what I’ve got so far. I’m combining elements of the 3rd Person Platformer (Third Person Status) script with the FPS character damage script. I’m using the fallout death script to instantly kill the character so that I can test the dying sequence. At the moment it is not working. The character dies when walking into the box, but it just disappears, rather than being replaced with the ragdoll.