Enable and Disable Teleport detestation

invertMASA

L3: Member
Nov 9, 2013
103
1
I'm making a raffle room and have 30 slots witch players can fill, But I want it so there is only one way in. So I know how to make a teleporter pick a random detestation, But I don't want more than one player in that slot. So how would I stop 2 or more players teleporting to the same slot?
 

Izotope

Sourcerer
aa
May 13, 2013
698
764
I'm not sure if I understand your design here, so I'll just explain how I understand it:

You make a trigger_teleport for each slot, while the triggers all share the same name, the slots do not.
Give all triggers this output:
OnStartTouch -> !self -> Disable

Depending on what you want, you can now make all triggers occupy the same space, perhaps in a doorway.
This will kind of give you the "random destination" effect.
Or you could make an entrance for every single teleporter.

When your raffle game has ended, you can just give your triggers the input enable, it's a lot easier now since all share the same name.
Let's say a logic_relay triggers the reset:
OnTrigger -> NameOfYourTeleporters -> Enable

Hope this helps
 

henke37

aa
Sep 23, 2011
2,075
515
Give each teleport source entity an unique name. Then use a logic_switch to pick a random one to change the destination of. You can use an asterix to wildcard address all of the teleporter sources. Use the AddOutput input to override keyvalues at runtime.
 

invertMASA

L3: Member
Nov 9, 2013
103
1
Should of put a picture in, would give you guys a better idea of what i'm talking about. lol

So everyone will go in that one teleporter and then fill all the slots with out more than one person going in one slot.

887ae6e49c.jpg
 
Last edited:

invertMASA

L3: Member
Nov 9, 2013
103
1
I'm not sure if I understand your design here, so I'll just explain how I understand it:

You make a trigger_teleport for each slot, while the triggers all share the same name, the slots do not.
Give all triggers this output:
OnStartTouch -> !self -> Disable

Depending on what you want, you can now make all triggers occupy the same space, perhaps in a doorway.
This will kind of give you the "random destination" effect.
Or you could make an entrance for every single teleporter.

When your raffle game has ended, you can just give your triggers the input enable, it's a lot easier now since all share the same name.
Let's say a logic_relay triggers the reset:
OnTrigger -> NameOfYourTeleporters -> Enable

Hope this helps

Perfect! Thank you!
 

Izotope

Sourcerer
aa
May 13, 2013
698
764
Actually I just noticed this might be flawed.
I think somebody who walks into the triggers will pick a random slot, but will cause all triggers to go disabled.

Perhaps combine this with henke37's idea
 

Empyre

L6: Sharp Member
Feb 8, 2011
309
187
Would it work if he puts a trigger brush at each destination that will disable the appropriate teleport?
 

invertMASA

L3: Member
Nov 9, 2013
103
1
Ok the way I am doing it now works, but its not truly random, Henke your idea seams like it would work, But don't quite fully understand it.
 

Idolon

they/them
aa
Feb 7, 2008
2,107
6,116
To clarify what Henke was saying: You can use AddOutput "teleporter target locationx" to just use one trigger_teleport, teleporter being the name of the trigger_teleport, and locationx the name of a teleporter location. This output will change the actual "Remote Desination" keyvalue in the trigger_teleport.

You'll want to put these outputs on a logic_case triggered with PickRandom. To make sure you don't teleport two people into the same cage, you might have to use two logic_cases with PickRandomShuffle, and alternate between the two for each teleportation.
 
Oct 6, 2008
1,948
446
Sorry for the necro bump but I'd rather keep it all in here instead of having people do multiple searches.

I'm trying to use 1 tele entrance and randomly select 8 exits

trigger_teleport "tele_01" with onstarttouch | tele_switch | PickRandom

tele_destinations tele_exit_01-08

logic case "tele_switch" OnCase 01-08 | Teleport_01-08 | AddOutput | teleexit_01-08

console telling me:

AddOutput input fired with bad string. Format: <output name> <targetname>,<inputname>,<parameter>,<delay>,<max times to fire (-1 == infinite)>

But it doesn't randomize - I'm always leaving exit 1 - any help is appreciated.
 
Last edited:
Oct 6, 2008
1,948
446
thanks! I am super sleepy at the moment - is this in my logic case or somewhere else? Hell I don't even know what day it is!
 
Oct 6, 2008
1,948
446
Thanks - works perfectly now!
 
Oct 6, 2008
1,948
446
ok - not so perfect and really weird! my telecase and teleporter brush all working great. My redspawn not working - so when I checked it the spawnroom brush has all the telecase coding on it under the inputs tab. and when I checked anything else that has a trigger brush on it also has the telecase inputs on it as well - any ideas as to what's going on?

edit: fixed the spawn but do I need to be concerned with the other part?
 
Last edited: