Respawn At Start Location

What It Does

Instead of respawning where you died, it takes you back to the start location of your module.


This script should be loaded into the OnRespawn slot of your module.

The Script

Script: Respawn At Start Location
Created By: Jaden Wagener
Created On: 08/30/02
//Respawns a player back at the start location.
//Script should be placed in the module's OnRespawn slot.
//NOTE: due to the current bug issue with the GetStartLocation function,
//a waypoint must be created at the starting location and its tag inserted
//in place of NW_WAYPOINT001.
#include "nw_i0_plot"
//Uses some in game default scripts
void main()
   //Set variables
   object xPC;
   int xHP;
   location xStart;
   effect xRez, xHeal, xVisual, xBad;
   //Populate variables
   xPC = GetLastRespawnButtonPresser();                      //Player respawning
   xHP = GetMaxHitPoints(xPC);                               //Player's Max HP
   xStart = GetLocation(GetWaypointByTag("NW_WAYPOINT001")); //Start location
   xRez = EffectResurrection();                              //Resurrect effect
   xHeal = EffectHeal(xHP);                                  //Heal effect
   //Resurrect at start location
   RemoveEffects(xPC); //Removes Negative effects. Is defined in nw_i0_plot.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.