19 lines
418 B
Plaintext
19 lines
418 B
Plaintext
|
|
void fnEject(object oPC,object oDest)
|
|
{
|
|
if (GetArea(oPC)!=GetArea(oDest)||GetDistanceBetween(oPC,oDest)>1.0)
|
|
{ // teleport
|
|
AssignCommand(oPC,ClearAllActions(TRUE));
|
|
AssignCommand(oPC,JumpToObject(oDest));
|
|
DelayCommand(0.5,fnEject(oPC,oDest));
|
|
} // teleport
|
|
}
|
|
|
|
|
|
void main()
|
|
{
|
|
object oPC=GetEnteringObject();
|
|
object oEject=GetNearestObjectByTag("BARRIER_EJECT",oPC,1);
|
|
fnEject(oPC,oEject);
|
|
}
|