Beginning Of Round Trigger?

CreepyCreepy Join Date: 2003-02-25 Member: 13981Members
I'm trying to get an event to trigger at the start of each round. What I'm using right now is 'target on spawn' of a 'team_hive'. The problem with this is that when the map is started the event fires *and* when the round actually starts it fires again. Any way to do this correctly?

I'm making a map similar in gameplay style to ns_siege005. A five minute countdown is triggered at the start of each round. At the end of the countdown, a door is triggered opening up a portion of the map.

Thanks in advance for your help.

Comments

  • RPG_JssmfulhudRPG_Jssmfulhud Join Date: 2002-11-02 Member: 4006Members
    Well, you can always target a trigger_once which will then target the desired object.

    This is just a simple solution but i'm too tired to bring up anything better. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
  • OlljOllj our themepark-stalking nightmare Fade Join Date: 2002-12-12 Member: 10696Members
    Your only choice is a " trigger_random set from "0" to "0" ".

    Ihis fires EVERY TIME just once after the beep-countdown, while joining teams, stops.

    most entities dont reset correctly, but this one does.
  • CreepyCreepy Join Date: 2003-02-25 Member: 13981Members
    Thanks for the suggestions so far... I've tried them both with no success.

    I tried the trigger_random:
    maxfiretime: 0
    minfiretime: 0
    wait: -1
    start: 0 (the name of the entity that I want to trigger, 0 is ignored)

    The event is still triggered once at map load (before round start when people are in the ready room) and then again when the round starts. I messed with the trigger_random flags also. If the 'Start On' flag is not checked, it never fires (duh). If the 'Remove on fire' flag is set, it still fires on map load and on round start.

    I thought about the trigger_once but the problem is that it while it fixes the double fire problem, it won't fire at the correct time. For example, the server switches to my map. People hang out in the ready room for a minute chatting then join teams. The countdown timer started when the map loaded and is running for the minute everyone is chatting. So, when the round starts they actually only have 4 minutes until the door opens instead of the intended 5.

    Any other ways to fix this problem?
  • OlljOllj our themepark-stalking nightmare Fade Join Date: 2002-12-12 Member: 10696Members
    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
    All following experiments were performed using sv_cheats 0, then switching to sv_cheats 1 to 'reset' the round. In some cases, multiple resets were performed. The marine class was used for all testing. The map used had fully functioning hives, respawns, etc.

    The following have been tested thoroughly and are KNOWN to reset, with some descriptive findings at the bottom of this.
    KNOWN DO RESET:
    func_door
    func_door_rotating
    func_seethroughdoor
    func_breakable *1
    trigger_random *2
    func_weldable *3
    func_water
    func_plat
    func_pushable *4

    The following were found to definately NOT reset, with some descriptive findings at the bottom of this.
    KNOWN DONT RESET:
    func_train
    func_tracktrain
    func_wall_toggle
    trigger_push (if its turned off)
    trigger_once (once its triggered in one round, thats it laddy! Kind of like the breakable problem in *1)
    trigger_hurt
    func_button *A
    func_platrot (wierd, i wouldve though it was derived from func_door_rotating/func_plat?)
    func_rot_button (same behaviour as func_button)
    PLUS:
    ANY entity that is 'killtarget-ed' (even hives, command stations)
    The target of any entity
    Most other halflife entities have not been designed to reset either.

    If you are bored, try these for some fun (found while testing)
    THINGS (NOT?) TO TRY:
    killtarget a func_door/seethroughdoor (halflife locks up badly)
    killtarget a func_nobuild (it is completely removed, even the way it acts as a clip!)
    func_pushable player throwing, as detailed below, USE a pushable and move left/right, see how far you can get thrown! (I got about 10-15ft  )


    NOTES ON ENTITIES ABOVE
    *1: If set to pressure or touch, if you break it by normal means (shooting), then the next round it will continue to function like a 'touch' breakable. HOWEVER, if you do actually 'touch-break' it in any round, then in the next and subsequent rounds, it will only function like a SHOOT breakable and no amount of standing on it will do a thing!!

    *2: Only ent that resets properly, helpful to reset all those other ents. Set it to times of 0 and 0, for shortest and longest time to execute immediately (even before round 'beeps' have finished!). Set it to 'start on' and turn off smartedit. Add in the names of the ents you want to trigger as both name and keyvalue for each one. At the start of each round the trigger_random will then helpfully reset everything for you, isnt that nice

    *3: It DOES reset, however the 'alpha' value doesnt, so it still looks like its been welded. Which gets confusing for the poor marines!

    *4: Although it does RESET as such (if set to breakable it can be rebroken), the func_pushable entity doesnt actually work as in halflife. It cant be pushed, and if you try to 'use-pull' it, you can actually get your player thrown clear of the func_pushable by quite a way!

    *A: If 'delay until close' is set, will continue the timer and 'close' next round. I.e. if its set to 10 seconds, you press it 5 seconds before round ends, then it will reset 5 seconds into next round. If set to toggle it will STAY in whatever position it was in in the previous round.


    If you have any further requests for entites you want me to test, then please post here! NOTE: im not doing them all, I spoke to merkaba and apparently most halflife ents just wont reset as flayra never coded them. It was merkaba's idea to do this as well, damn him! I just hope this helps Flay for further coding.

    Final note: Round reset problems CAN be avoided with careful use of the 'trigger_random' entity I detailed above, it always fires at the start of each round if you set it up correctly. Use it wisely and much self-induced-alopecia might be avoided!

    Enjoy 
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
  • CreepyCreepy Join Date: 2003-02-25 Member: 13981Members
    As I stated above... the trigger_random does trigger at the start of the round but it also triggers at map load.

    For example, the map loads and the trigger_random triggers a countdown. Five seconds later a round starts and the countdown is triggered *again* resulting in two concurrent countdowns.

    From your quoted post, it looks as if there is no entity specifically designed for my intended purpose. I was hoping to get someone more familiar with mapping than I to give some suggestions for workarounds to accomplish this. My current thought is to use a trigger_once in each spawn area and a trigger_counter (count: 2) to trigger the start of round event but I haven't tried it yet.

    Any other ideas?
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    trya trigger presnece in the marine start
    a multi source adn tehn teh trigger random might work havent tried it yet
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--Creepy+Mar 28 2003, 12:44 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Creepy @ Mar 28 2003, 12:44 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> As I stated above... the trigger_random does trigger at the start of the round but it also triggers at map load.

    Any other ideas? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Time to use trigger_changetarget.

    Hook up that trigger_random to a trigger_relay that targets a trigger_changetarget. On map load, the trigger_changetarget fires, redirecting the trigger_relay that the trigger_random points to to the multi_manager you want to fire at the start of every round.

    On map load:

    trigger_random-->trigger_relay-->trigger_changetarget-->trigger_relay/multi_manager

    On round start:

    trigger_random-->trigger_relay-->multi_manager

    This assumes trigger_changetarget is still an option on NS, but I don't think it would have changed from the plain HL implementation <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->.
Sign In or Register to comment.