30 lines
974 B
Plaintext
30 lines
974 B
Plaintext
|
void main()
|
||
|
{
|
||
|
//This line tells us who used the triggering object
|
||
|
object oPC = GetPCSpeaker();
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
//This line randomly generates the point the PC will teleport to.
|
||
|
int nWaypointNumber = Random(4);
|
||
|
|
||
|
//The teleporting Waypoints. The DelayCommand was used to allow the special effect time to appear and 'fire' off before
|
||
|
//transporting the PC.
|
||
|
|
||
|
switch (nWaypointNumber)
|
||
|
{
|
||
|
case 0:
|
||
|
DelayCommand(1.0, AssignCommand( oPC, JumpToLocation( GetLocation( GetWaypointByTag( "rnd_area_wp001" )))));
|
||
|
break;
|
||
|
case 1:
|
||
|
DelayCommand(1.0, AssignCommand( oPC, JumpToLocation( GetLocation( GetWaypointByTag( "rnd_area_wp002" )))));
|
||
|
break;
|
||
|
case 2:
|
||
|
DelayCommand(1.0, AssignCommand( oPC, JumpToLocation( GetLocation( GetWaypointByTag( "rnd_area_wp003" )))));
|
||
|
break;
|
||
|
case 3:
|
||
|
DelayCommand(1.0, AssignCommand( oPC, JumpToLocation( GetLocation( GetWaypointByTag( "rnd_area_wp004" )))));
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|