Page 1 of 1

Can a piece of code be executed on player demise or "death"?

Posted: Sat 05 Nov , 2011 4:33 am
by LegendaryAgent
hey, i have a class which is currently having a timer checking for 1 specific pawn if its still alive or not, and if it is, it executes a code, however there must be a better way to achieve this, i want to execute a code imediately when the specific pawn is no longer "alive".

Is there any event i could use for that directly in the class that checks if the pawn is out of hp?

Thanks in advance!

Re: Can a piece of code be executed on player demise or "dea

Posted: Sat 05 Nov , 2011 6:12 pm
by Azarael
GameRules was created for this kind of thing.

Re: Can a piece of code be executed on player demise or "dea

Posted: Mon 07 Nov , 2011 7:36 am
by LegendaryAgent
Azarael wrote:GameRules was created for this kind of thing.
thx for ur replies as usual, ugh do i rly have to make a new class?

Re: Can a piece of code be executed on player demise or "dea

Posted: Mon 07 Nov , 2011 12:05 pm
by iZumo
It's a better mechanism than putting the code directly to the controller (I think it's function PawnDied in Controller).

Re: Can a piece of code be executed on player demise or "dea

Posted: Tue 08 Nov , 2011 3:34 am
by LegendaryAgent
Izumo_CZ wrote:It's a better mechanism than putting the code directly to the controller (I think it's function PawnDied in Controller).
thanks a bunch izumo, i understand, but if this doesnt impact performance, i would like to keep it as simple as possible, by choosing NOT to make so many files xD