SRL Archive - OSR Help

How Do You Make A Function That Says You're Dead?


hedfun2

2013-06-05 15:50:02

I want a way to tell simba that when dead, do this. Is there any built in function / Way that will say the player is dead?

I want to create something easy like:

if (dead) then (action);

Element17

2013-06-05 15:52:35

I believe there is a text that comes up in the chat box correct? Try searching for that?

hedfun2

2013-06-05 15:56:26

How would I do that? I'm kind of new to scripting.

Kevin

2013-06-05 16:00:47

There are some nice stuff built in for this actually so long as you use the SRL include :)

procedure SetupScript;//Wherever you do your one time initilization stuff
begin
Reincarnate:=true;//This makes FindNormalRandoms not end the script when it notices you've died.
end;

//whatever part of your code you want the death determination to be in
If(FindDead()) Then
begin
//action
end else
exit;//you aren't dead!