Jump to content
 Share

Moltard

[ZE Mapping] Level System (easy new method)

Recommended Posts

Posted  Edited 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.

  1. Give it a name (Level_Case for the guide)
  2. Set Case01 to 1
  3. Set Case02 to 2
  4. Set Case03 to 3
  5. etc..
  6. 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
  1. OnCase01 > Server > Command > say **LEVEL1** > Delay=0
  2. OnCase01 > Door1 > Break > > Delay=0
  3. OnCase02 > Server > Command > say **LEVEL2** > Delay=0
  4. OnCase02 > Door2 > Break > > Delay=0
  5. OnCase03 > Server > Command > say **LEVEL3** > Delay=0
  6. OnCase03 > Door3 > Break > > Delay=0

 

Now you need a math_counter.

  1. Give it a name (Level_Counter for the guide)
  2. Set Initial Value to 1
  3. Set Minimum Legal Value to 1
  4. Set Maximum Legal Value to the numbers of level you want in your map (3 for the guide)
  5. 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.

  1. Give it a name (Level_Counter_Template for the guide)
  2. Set Template01 to Level_Counter
  3. 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
  1. Give it a name (Level_InitCounter for the guide)
  2. 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
  1. The first output will spawn the point_template, to spawn the Level_Counter
  2. The second output will change the classname of the Level_Counter to make it permanent (it will keep its value over the rounds)
  3. 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.

  1. Add a logic_auto or a logic_relay in your map.
  2. 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:

  1. The first round start, it FireUser1 on the info_target, which spawn the Level_Counter_Template, and then make the Level_Counter permanent
  2. It then GetValue on Level_Counter to trigger the level corresponding to the counter value (Level1 since it's the first round)
  3. When a new round start, the Level_Counter still exist despite the point_template
  4. 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.

  1. Give it a name (Level_InitCounter for the guide)
  2. 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
  1. The first output will change the classname of the Level_Counter to make it permanent (it will keep its value over the rounds)
  2. 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.

  1. Add a logic_auto or a logic_relay in your map.
  2. 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:

  1. The first round start, it FireUser1 on the info_target, which make the Level_Counter permanent, and rename it to Level_Counter_Global
  2. It then GetValue on Level_Counter_Global to trigger the level corresponding to the counter value (Level1 since it's the first round)
  3. When a new round start, the Level_Counter_Global still exist, and the normal Level_Counter spawn
  4. 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:

  1. point_template system: https://www.dropbox.com/s/v381tpavvi4ikbo/dev_level_css.vmf?dl=0
  2. No point_template system: https://www.dropbox.com/s/21d6ii39apbkzsx/dev_level_cssAlt.vmf?dl=0

 

CS:GO .vmf:

  1. point_template system: https://www.dropbox.com/s/6nh6lc7vlvugda0/dev_level_csgo.vmf?dl=0
  2. No point_template system: https://www.dropbox.com/s/9sqiwcfcsbuw6sq/dev_level_csgoAlt.vmf?dl=0

 

 

Edited by Moltard

IiWfJa9.gif

Share this post


Link to post
Share on other sites




×
×
  • Create New...