Initial Upload
Initial Upload
This commit is contained in:
29
_module/nss/rand_area_trans1.nss
Normal file
29
_module/nss/rand_area_trans1.nss
Normal file
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user