PDA

View Full Version : Concept of Death?


akvik
25th Jan 2004, 03:36 PM
Hi Folks,

I'm a newbie to UnrealEngine2 Runtime, and I have a question to programmers out there:

How do I add a concept of death, which means that the actor can take damage and die, and then spawn back to playerstart?

Thanks!

[SAS]Solid Snake
25th Jan 2004, 06:51 PM
In the player pawn, you need to have a variable which contains the amount of health it has. Allow other objects to decrement or increment this value and you have the damage property. When health is <= 0 your dead, if dead spawn at player start. That's the concept. If you wanted code there are plenty of examples around inside Unreal, Unreal Tournament, UT2003 .. lots of Unreal games.

akvik
26th Jan 2004, 02:12 AM
Thanks, I will take a look in the player pawn code, and see if I can figure it out!