Moltard 68 / 3,023 Report Post Posted March 30, 2019 Edited May 19, 2020 by Moltard Level System There is a new easy way, (understandable by probably any new mapper) of making levels/stages for Zombie Escape maps. Thanks to .george/KORK for the system idea Thanks to Enviolinador and Syoudous aswell Basically, you will make the counter that save the levels permanent, so it keeps its value when a new round start. So you no longer need to stock that value in a func_brush/worldspawn _____________________________________ Simple VMF showing how to do permanent entities: https://www.dropbox.com/s/2pfy7av2sft77b2/dev_perm_entities_levels.vmf?dl=0 Below will be the step by step guide and at the end VMF used in it. This VMF is enough to the system working. _____________________________________ How to do it: First you need a logic_case. Give it a name (Level_Case for the guide) Set Case01 to 1 Set Case02 to 2 Set Case03 to 3 etc.. Add outputs corresponding of your levels In the example I will just Break a wall depending of the level, to open a different path You will add all outputs for the levels on the logic_case OnCase01 > Server > Command > say **LEVEL1** > Delay=0 OnCase01 > Door1 > Break > > Delay=0 OnCase02 > Server > Command > say **LEVEL2** > Delay=0 OnCase02 > Door2 > Break > > Delay=0 OnCase03 > Server > Command > say **LEVEL3** > Delay=0 OnCase03 > Door3 > Break > > Delay=0 Now you need a math_counter. Give it a name (Level_Counter for the guide) Set Initial Value to 1 Set Minimum Legal Value to 1 Set Maximum Legal Value to the numbers of level you want in your map (3 for the guide) Add an output that target the logic_case: OnGetValue > Level_Case > InValue > > Delay=0 > Don't check Only Once This output will take the counter value, and check if a CaseXX value match it If the counter value is 2, the logic_case will trigger all outputs OnCase02 because "Case02" = "2" Now add a point_template. Give it a name (Level_Counter_Template for the guide) Set Template01 to Level_Counter Make sure only the flag Preserve Entity Name is checked Now add an info_target. info_target is a permanent entity, which mean if you kill it, it is gone forever, unless you reload the map. It also means all his outputs with Only Once can be triggered only once during the map Give it a name (Level_InitCounter for the guide) Add these outputs: OnUser1 > Level_Counter_Template > ForceSpawn > > Delay=0 > Check Only Once OnUser1 > Level_Counter > AddOutput > classname info_target > Delay=0.03 > Check Only Once OnUser1 > !self > Kill > > Delay=0.06 > Check Only Once The first output will spawn the point_template, to spawn the Level_Counter The second output will change the classname of the Level_Counter to make it permanent (it will keep its value over the rounds) The third output is simply to remove the info_target completly from the map once the Level_Counter is spawned Now you need to initialize everything. Add a logic_auto or a logic_relay in your map. Add these outputs (OnSpawn is for the logic_relay / OnMapSpawn is for the logic_auto): OnSpawn > Level_InitCounter > FireUser1 > > Delay=0 > Check Only Once OnSpawn > Level_Counter > GetValue > > Delay=0.02 > Check Only Once What happen is this: The first round start, it FireUser1 on the info_target, which spawn the Level_Counter_Template, and then make the Level_Counter permanent It then GetValue on Level_Counter to trigger the level corresponding to the counter value (Level1 since it's the first round) When a new round start, the Level_Counter still exist despite the point_template It will GetValue to trigger the level How to change the level: Since the Level_Counter is now permanent, it will never get reset when the round restart. So at the end of your level, when CT wins, just do: OnWhatever > Level_Counter > SetValue > X > Delay=What you want Replace X with the value you want If it's the end of Level1, you will do SetValue > 2 If it's the end of Level2, you will do SetValue > 3 etc... Alternative without point_template: Setup the Level_Counter and Level_Case like above. Add an info_target. Give it a name (Level_InitCounter for the guide) Add these outputs: OnUser1 > Level_Counter > AddOutput > classname info_target > Delay=0.00 > Check Only Once OnUser1 > Level_Counter > AddOutput > targetname Level_Counter_Global > Delay=0.02 > Check Only Once OnUser1 > !self > Kill > > Delay=0.04 > Check Only Once The first output will change the classname of the Level_Counter to make it permanent (it will keep its value over the rounds) The second output will change the targetname of the Level_Counter to make it different from the one that will respawn every round Now you need to initialize everything. Add a logic_auto or a logic_relay in your map. Add these outputs: OnSpawn > Level_InitCounter > FireUser1 > > Delay=0 > Check Only Once OnSpawn > Level_Counter_Global > GetValue > > Delay=0.04 > Check Only Once OnSpawn > Level_Counter > Kill > > Delay=0.10 > Check Only Once The second output will call an entity that doesn't exist in Hammer, but will exist in game, so it show as red What happen is this: The first round start, it FireUser1 on the info_target, which make the Level_Counter permanent, and rename it to Level_Counter_Global It then GetValue on Level_Counter_Global to trigger the level corresponding to the counter value (Level1 since it's the first round) When a new round start, the Level_Counter_Global still exist, and the normal Level_Counter spawn The logic_auto/relay will kill Level_Counter since it no longer needs to exist How to change the level: To change the level with this system, you won't call Level_Counter like earlier, but Level_Counter_Global. OnWhatever > Level_Counter_Global > SetValue > X > Delay=What you want Since Level_Counter_Global doesn't exist in Hammer, the outputs will show as red, but it will work ingame. Download Link for .vmf: CS:S .vmf: point_template system: https://www.dropbox.com/s/v381tpavvi4ikbo/dev_level_css.vmf?dl=0 No point_template system: https://www.dropbox.com/s/21d6ii39apbkzsx/dev_level_cssAlt.vmf?dl=0 CS:GO .vmf: point_template system: https://www.dropbox.com/s/6nh6lc7vlvugda0/dev_level_csgo.vmf?dl=0 No point_template system: https://www.dropbox.com/s/9sqiwcfcsbuw6sq/dev_level_csgoAlt.vmf?dl=0 Edited May 19, 2020 by Moltard Share this post Link to post Share on other sites More sharing options...