Player Activatable WayPoints On respawn
what it does: actually it's 2 scripts one for the objet to be returned to and
one for the onrespawn hook
when the player respawns the PC is teleported back to the waypoint last acivated
by the player. useful for avoiding multiple deaths in a row.
first you need to create a custom object to use as a waypoint(make sure the
usable tag is checked)
then on the onuse hook for the waypoint put this script
void main()
{
string sWPativated = ("Haven Waypoint Activated");
SetLocalString (GetModule(), "Havenrestart",GetTag(OBJECT_SELF));
SpeakString (sWPactivated);
}
the sWPactivated is the text string that will pop up when the waypoint is used
telling players that the waypoint is activated. if you want different town names
to show up then you need to copy this script for each town and give it a
different name.
"HavenRestart" is tag of the Custom object you created for this purpose.
then Place this script with any modifications you see fit in the on respawn hook
in module properties
void main()
{
object oRespawner = GetLastRespawnButtonPresser ();
ApplyEffectToObject (DURATION_TYPE_INSTANT, EffectResurrection(), oRespawner);
location lrespawnloc;
string Havre;
Havre = GetLocalString (GetModule(), "Havenrestart");
lrespawnloc = GetLocation (GetObjectByTag (Havre));
AssignCommand (oRespawner, JumpToLocation (lrespawnloc));
}
Have fun with this one... i havent tested it in multiplayer yet tell me if it
works will ya.
_________________
life and death are nothing more than words. The actual feelings involved dictate
which word is better.