Initial Upload
Initial Upload
This commit is contained in:
26
_module/nss/lod_portals.nss
Normal file
26
_module/nss/lod_portals.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
// lod_portals.nss
|
||||
|
||||
// This script will replace the plethera of individual portal scripts
|
||||
// throughout the module. To use, add a Local Variable to the Placeble
|
||||
// that is being used. This will be the tag of the target waypoint.
|
||||
|
||||
// ex: sWaypoint (string) planarpassage001
|
||||
// This would jump the player from the used portal to the planarpassage001 waypoint.
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastUsedBy();
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag(GetLocalString(OBJECT_SELF, "sWaypoint"));
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
}
|
||||
Reference in New Issue
Block a user