//:://///////////////////////////////////////////// //:: 07_fluxtransport //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* OnActionTaken handler for Flux Point Teleports the PC to the location tagged "DEST_"+ the name of the trigger */ //::////////////////////////////////////////////// //:: Created By: ruelk //:: Created On: 2/21/04 //::////////////////////////////////////////////// void main() { object oPC = GetPCSpeaker(); object oTarget; location lTarget; oTarget = GetWaypointByTag("DEST_"+GetTag(OBJECT_SELF)); lTarget = GetLocation(oTarget); if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return; //We are going to teleport the PC to a waypoint AssignCommand(oPC, ClearAllActions()); DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget))); //Make it look pretty ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oPC)); //take a few seconds and deactivate the placable ActionWait(4.0); AssignCommand(OBJECT_SELF, PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)); //If the placable has light we turn it off and adjust the surrounding light accordingly SetPlaceableIllumination (OBJECT_SELF, FALSE); RecomputeStaticLighting(GetArea(oTarget)); }