Aantioch_Infernum/_module/nss/rand_area_trans1.nss

30 lines
974 B
Plaintext
Raw Permalink Normal View History

2023-08-08 16:22:17 -04:00
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;
}
}