Need help with oven mechanic

Discussion in 'Mapping Questions & Discussion' started by OctoBlitz, Jul 30, 2017.

  1. OctoBlitz

    OctoBlitz L5: Dapper Member

    Messages:
    221
    Positive Ratings:
    70
    Hi everyone,

    I am currently working on the oven mechanic for my 72hr map in order to save me some time on figuring it out during the jam.

    In my map, there is an oven that will open when the point is capped containing health for the player to use, if the player stays in the oven too long, they take damage for 2 - 3 seconds and is then killed by the oven's heat. I'd like some help figuring out a way for me to set a trigger system to make this concept work properly before the jam begins. Anyone got any suggestions to help with my problem?
     
  2. Idolon

    aa Idolon the worst admin

    Messages:
    1,557
    Positive Ratings:
    4,479
    While this wouldn't do exactly as you want, I'd recommend just using a trigger_hurt set to a value that won't kill players instantly but is dangerous over time ("Doubling w/ forgiveness" may be helpful for this). If players walk into the oven and aren't immediately hurt by it, they might decide to stay in there without realizing that it will hurt them over time.

    If you want to have the delay, what you can do is use the same trigger_hurt setup but filter it for a specific name. Then, you can add a trigger_multiple that uses AddOutput to set the targetname of !activator to whatever the trigger_hurt filters for. Give this input a delay of your choosing. Also use the same method when the player leaves the trigger to set their targetname to something else that won't get hurt by the trigger_hurt.

    It's possible this method won't work if a player enters and leaves the trigger faster than your delay, as the delayed input will come after the "cancel" input, meaning they will start hurting instantly when they re-enter the oven. In that case, move the delayed input to a logic_relay and have the "cancel" input also send CancelPending to the logic_relay.
     
    • Like Like x 1
    • Agree Agree x 1
Tags: