
1. Jump PC to a waypoint (Placeable OnUsed)
Code: Select all
//::///////////////////////////////////////////////
//:: Name jump_pc_2wp
//:: FileName jump_pc_2wp.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/* When a PC uses the placeable, it teleports him to a destination waypoint
with tag: WP_<tag of placeable>
*/
//:://////////////////////////////////////////////
//:: Created By: Mistcaller
//:: Created On: November 11, 2003
//:://////////////////////////////////////////////
void main()
{
string sExplanation = GetLocalString(OBJECT_SELF,"sExplanation");
object oPC=GetLastUsedBy();
string sTempTag = GetTag(OBJECT_SELF);
object oTarget = GetObjectByTag("WP_"+ sTempTag);
if (GetIsObjectValid(oTarget))
{
ClearAllActions();
AssignCommand(oPC, JumpToObject(oTarget));
if (sExplanation !="")
SendMessageToPC(oPC, sExplanation);
}
}