Button With Wait Time At -1 Doesn't Reset?
dignome
Join Date: 2003-08-04 Member: 18853Members, Constellation, Reinforced - Shadow
<div class="IPBDescription">um, why?</div> I was scripting a sequence of entities for an ns map and noticed that a func_button with wait time of -1 doesn't reset on next round.....seriously why would they do that?
I'm new to ns mapping, usually on most mods the button actually resets....sucks now because I have to use globals to make the button stop triggering stuff.
also what is with the game not having a round start/end entity for triggering stuff?
I'm new to ns mapping, usually on most mods the button actually resets....sucks now because I have to use globals to make the button stop triggering stuff.
also what is with the game not having a round start/end entity for triggering stuff?
Comments
Well no, that's a pack of lies. Honestly I think it's something to do with the NS game code, some entities just don't reset round after round <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
Any ideas on when they might fix this, maybe in 2.1? I think a few peeps would love a round start/end entity that can target.
any good tutorial links for using <b>2.0</b> entities?
The entity code wasn't designed for round-based gameplay--Half-Life maps traditionally reload from scratch after every game, resetting their state from disk. The lack of reset is an artifact of the original code, not a design decision. The question shouldn't be "why would they do that?", but "when can they fix that?" <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Personally, I'd look into a function added to the base entity class to recall state after each round using the strings passed from the BSP file during entity creation, but that might be more robust than what the NS team would like to do.
things you need: 1 trigger_random
1 func_button
1 trigger_changetarget
something to be triggered on new round (feel like i'm making stew here)
trigger_random: give it min and max values of zero....actually can be whatever as long as it's short and the same. then on the wait time set it to -1 as described in chromeangel's guide (this entity does reset btw ;p). now turn off smart edit and add in the name of your func_button and a value of 0...have no idea if 0 is a time call or not in this list. also on the flags tab, check "start on".
func_button: give the func_button a target value pointing to the trigger_changetarget 'name' value. keep the "wait to reset" and "delay" near 0 on the func_button.
trigger_changetarget: 'target' indicates the func_button in this case, so be careful. set the target value to the func_button name value. then set the "new target" value to the thing you want triggered on a new "round"
note: you have to do all of the above because trigger_random is called twice....once on load of map and again on game start.
You don't have to do yours this way, it's just something I rigged up.
(my map now works which is really awesome, now i just need to concentrate on visuals)
flayra can i have a round start/end entity...i've been good i swear.
Okay, you might have to add some extra twists and turns in your corridors and whatnot, but atleast you dont have to think about resetting and all that other crap.
<!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
doors seem to reset fine, i just didn't realise they don't toggle without new round being triggered.
/me loves entities....goes off to make some more funkiness