Random Locatation, Intersection.
Posted: March 15th, 2006, 7:47 pm
I think we all had it one time or an other, to many jump rooms in a map.
So i build my self a simple solution for this problem.
A Random Locatation, Intersection.
i build an intersection and added a Trigger, once i get into the trigger, the game it self, gets to pick, where i go from here.
This way i get to keep all my rooms, and the player can play the map multiple times,
ending up in a different room everytime.
Here's the code
in your map, make a trigger_multiple at the location from where you want to go dynamic with your players.
and give it these values.
That's all for the map section
Find and write down the coordinate's in your map where you want to send your players to.
use this for scripting in your_map.gsc
Thats all, have fun.
So i build my self a simple solution for this problem.
A Random Locatation, Intersection.
i build an intersection and added a Trigger, once i get into the trigger, the game it self, gets to pick, where i go from here.
This way i get to keep all my rooms, and the player can play the map multiple times,
ending up in a different room everytime.
Here's the code
in your map, make a trigger_multiple at the location from where you want to go dynamic with your players.
and give it these values.
Code: Select all
key "targetname"
value "transporter_intersection"
Find and write down the coordinate's in your map where you want to send your players to.
use this for scripting in your_map.gsc
Code: Select all
main()
{
thread Transporter_intersection();
}
Transporter_intersection()
{
while(1)
{
finishtrig = getent ("transporter_intersection","targetname");
finishtrig waittill ("trigger",user);
loc[0] = (-3048, 888, 800); // First Location
loc[1] = (-588, -1088, 8); // Second Location
loc[2] = (-1120, -408,8); // Third Location
user setOrigin(loc[randomInt(loc.size)]); // Let the game pick a random Location
wait .5;
}
}