Enable and Disable Teleport detestation

Discussion in 'Mapping Questions & Discussion' started by invertMASA, Nov 27, 2014.

  1. invertMASA

    invertMASA L3: Member

    Messages:
    103
    Positive Ratings:
    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?
     
  2. Izotope

    aa Izotope Never releases maps

    Messages:
    625
    Positive Ratings:
    592
    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
     
    • Thanks Thanks x 1
  3. henke37

    aa henke37

    Messages:
    1,926
    Positive Ratings:
    454
    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.
     
    • Thanks Thanks x 2
  4. invertMASA

    invertMASA L3: Member

    Messages:
    103
    Positive Ratings:
    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.

    [​IMG]
     
    Last edited: Nov 28, 2014
  5. invertMASA

    invertMASA L3: Member

    Messages:
    103
    Positive Ratings:
    1
    Perfect! Thank you!
     
    • Thanks Thanks x 1
  6. Izotope

    aa Izotope Never releases maps

    Messages:
    625
    Positive Ratings:
    592
    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
     
  7. Empyre

    Empyre L6: Sharp Member

    Messages:
    297
    Positive Ratings:
    148
    Would it work if he puts a trigger brush at each destination that will disable the appropriate teleport?
     
  8. invertMASA

    invertMASA L3: Member

    Messages:
    103
    Positive Ratings:
    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.
     
  9. Idolon

    aa Idolon the worst admin

    Messages:
    1,557
    Positive Ratings:
    4,479
    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.
     
    • Thanks Thanks x 1
  10. Kill_the_Bug

    Kill_the_Bug L14: Epic Member

    Messages:
    1,477
    Positive Ratings:
    240
    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: Mar 30, 2015
  11. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    AddOutput requires two parameters for key overwrite, key and value. Your parameter needs to be target teleexit_01
     
  12. Kill_the_Bug

    Kill_the_Bug L14: Epic Member

    Messages:
    1,477
    Positive Ratings:
    240
    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!
     
  13. Kill_the_Bug

    Kill_the_Bug L14: Epic Member

    Messages:
    1,477
    Positive Ratings:
    240
    Thanks - works perfectly now!
     
  14. Kill_the_Bug

    Kill_the_Bug L14: Epic Member

    Messages:
    1,477
    Positive Ratings:
    240
    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: Mar 31, 2015