Code: Select all
//::///////////////////////////////////////////////
//:: Name jump_pc_2wp_xtra
//:: FileName jump_pc_2wp_xtra.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
//:://////////////////////////////////////////////
// Edited to include a test for possession of the appropriate key,
// Last Edited by: Sindol, December 1, 2003
// It gets the keytag from the name field of the target waypoint.
#include "nw_i0_plot"
void main()
{
object oPC=GetLastUsedBy();
string sTempTag = GetTag(OBJECT_SELF);
object oTarget = GetObjectByTag("WP_"+ sTempTag);
if (GetIsObjectValid(oTarget))
{
string sKeyTag = GetName(oTarget);
if (HasItem(oPC, sKeyTag))
{
ClearAllActions();
AssignCommand(oPC, JumpToObject(oTarget));
}
}
}
Code: Select all
//:: FileName : jump_pc_2wp.nss
/* When a PC uses the placeable, it teleports him to a destination waypoint with tag: WP_<tag of placeable>
*/
void main()
{
object oPC=GetLastUsedBy();
string sTempTag = GetTag(OBJECT_SELF);
object oTarget = GetObjectByTag("WP_"+ sTempTag);
if (GetIsObjectValid(oTarget))
{
ClearAllActions();
AssignCommand(oPC, JumpToObject(oTarget));
}
}