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

You need help? It's here!
Post Reply
LegendaryAgent
Member
Posts: 80
Joined: Thu 29 Sep , 2011 12:26 am
Contact:

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

Post by LegendaryAgent » Sat 05 Nov , 2011 4:33 am

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!

User avatar
Azarael
UT2004 Administrator
Posts: 5365
Joined: Thu 11 Feb , 2010 10:52 pm

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

Post by Azarael » Sat 05 Nov , 2011 6:12 pm

GameRules was created for this kind of thing.

LegendaryAgent
Member
Posts: 80
Joined: Thu 29 Sep , 2011 12:26 am
Contact:

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

Post by LegendaryAgent » Mon 07 Nov , 2011 7:36 am

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?

iZumo
Disappeared Administrator
Posts: 4196
Joined: Fri 19 Mar , 2010 1:21 am
Location: Earth
Contact:

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

Post by iZumo » Mon 07 Nov , 2011 12:05 pm

It's a better mechanism than putting the code directly to the controller (I think it's function PawnDied in Controller).

LegendaryAgent
Member
Posts: 80
Joined: Thu 29 Sep , 2011 12:26 am
Contact:

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

Post by LegendaryAgent » Tue 08 Nov , 2011 3:34 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests