|
|
|
|
|
|
|
|
| Links |
|
|
|
Teleporter with Random Destination - By Raeven0 |
|
This tutorial was last updated on Apr 12, 2005.
ENTITIES USED:
trigger_teleport
"Name" - tele
"Remote Destination" - targ1
output OnStartTouch target randomizer input PickRandom
ai_changetarget (it makes no difference where you place it)
"Name" - to1
"Target Entity" - tele
"New Target" - targ1
ai_changetarget (it makes no difference where you place it)
"Name" - to2
"Target Entity" - tele
"New Target" - targ2
ai_changetarget (it makes no difference where you place it)
"Name" - to3
"Target Entity" - tele
"New Target" - targ3
info_target
"Name" - targ1
info_target
"Name" - targ2
info_target
"Name" - targ3
logic_case (it makes no difference where you place it)
"Name" - randomizer
"Case 01" - 1
"Case 02" - 2
"Case 03" - 3
output OnCase01 target to1 input Activate
output OnCase02 target to2 input Activate
output OnCase03 target to3 input Activate
DOWNLOAD EXAMPLE MAP (128KB)
This setup uses three different destinations, chosen randomly. The trigger_teleport, when it's used, causes the logic_case to fire a random output; this random output, in turn, will cause one of the three ai_changetarget entities to change the teleporter's target. This setup is easily modified for more destinations; just add a new info_target, a new ai_changetarget, a new case to the logic_case, and a new output for that case. (That is, you would need to add an info_target named targ4, an ai_changetarget named to4, change the logic_case's Case 04 to 4, and add an OnCase04 output to the logic_case, to fire to4.)
Still need help? Ask your questions in one of our HELP FORUMS
|
|
|
| Comments |
| FuSoYa - Jul 26, 2010 |
| @ Ali If you want them to not repeat until they are all teleported to then change the trigger_teleport to output PickRandomShuffle instead of PickRandom. If you want it to stop teleporting after 3 runs totally then you will have to have a math counter and stuff output kill to the trigger_teleport to get rid of it. |
| Ali - Jun 21, 2010 |
| is it possible to make the randomizer remember which teleport it sent the player previously and make that teleporter unavailable for the next teleportation? say it uses targ1 in the first run. then it can only use targ2 and targ3 and so on.. |
| The Torrent - Jul 30, 2007 |
| question, does this make all the entities in the triggerteleporter go to the same spot or does it do a different case per entity? if it makes everyone go to one spot, is there a way around that? |
| Tom - Feb 17, 2007 |
| This map is a good example but needs to be fixed when you go into the teleporter it teleports you but a part of the player is outside of the map and the only way to walk around freely on the map is to use no-clip. everything else is good. |
|
|
|
|