25 lines
799 B
Plaintext
25 lines
799 B
Plaintext
void main()
|
|
{
|
|
/*
|
|
* Smart Teleport for GenericTrigger to Waypoint
|
|
* -------------------------
|
|
***************** By Zeke Xeno ********************
|
|
|
|
* This is attached to the OnEnter event of a GenericTrigger
|
|
* First, create a generic trigger and give it a tag like "Here2There_01"
|
|
* Second, create a destination Waypoint and name it AST_(+ the
|
|
* tag of your trigger, example "AST_Here2There_01"
|
|
*/
|
|
object oidUser;
|
|
object oidDest;
|
|
string sDest;
|
|
|
|
oidUser = GetEnteringObject();
|
|
string sTag = GetTag(OBJECT_SELF);
|
|
SetLocalString( (OBJECT_SELF), "Destination" , "AST_"+sTag );
|
|
sDest = GetLocalString(OBJECT_SELF,"Destination");
|
|
oidDest = GetObjectByTag(sDest);
|
|
|
|
AssignCommand(oidUser,ActionJumpToObject(oidDest,FALSE));
|
|
}
|