In my attempt to start learning Unreal Script I'm trying to make a small mutator that does the opposite of the Regen Mutator, ie. Reduces your health. I've coded the reduction bit (nice and simple ), but now I want to kill the player when their health reaches zero. At the moment I'm using this:
I don't feel like this is the correct way, so any suggestions would be helpful in respect to this.
I would also like to take 1 from the players score when they die, which with this code doesn't happen, so I tried doing it like this:
which throws up an error. As I said, I'm still learning, and any pointers in the right direction would be appreciated.
Thanks, Stuk
(Now lets hope I don't get flamed for this first post )
Code:
if (C.Pawn.Health <= 0)
{
C.Pawn.LifeSpan = 0.1;
}
I would also like to take 1 from the players score when they die, which with this code doesn't happen, so I tried doing it like this:
Code:
PlayerReplicationInfo.Score--;
Thanks, Stuk
(Now lets hope I don't get flamed for this first post )