Counter-Strike 2
Недостаточно оценок
How to make a Lava Floor map
От Keplyx
In this guide, I'll show you how to make a map for the lava floor gamemode. Some knowledge of hammer is needed to follow this guide, and it will be illustrated by images and an example/demo map.

I'll cover the basics, then it's up to you to decide your map theme, layout... and you are free to tweak the settings for the lava to suit your map!

I would love too see more maps for this gamemode on the workshop, and if you make one, please give me credit in the description, put a link to this guide, and post your map here, in the comments!!


I'll first explain quickly what we are going to do (if you are used to hammer, this will allow you to be faster), then explain the details if you have trouble.

I made a demo map you can download (.vmf and .bsp, see the download section), so if you are too lazy to read the guide, just load the map in Hammer and in csgo to see how things work. You can also use the map as a complement, to help you understand better the guide.

This is very long, but don't worry, there's a lot of images :D

Anyway, let's start!
   
Наградить
В избранное
В избранном
Удалить
What's Lava Floor?
Lava Floor is a gamemode in which the lava rises randomly after an alarm. See that as a concept you can addapt to any gamemode you want.

--------------------Before the alarm------------------------------------------------------------After the alarm:


Made a first map in a deathmatch, free for all style, if you want to test.

When you create a map, name it lfd_"mapname" (for lava floor deathmatch) or just lf_"mapname" (for just lava floor).
Prerequisites
To have the lava texture, you can download the RealWorld Texture Pack 2[www.tophattwaffle.com] by TopHATTWaffle or find an other one free to use (I used the TopHATTWAffle one for the demo, so you will need it for the .vmf to work properly).
Simple lava floor
Demo map in workshop

Demo map in .vmf: (remove space after "mega.nz")
mega.nz /#!B0cTWajI!6kE3mlxU7SnbyU9lQETAAoHXh4G2ekwAHHoYVcEorD4

What we are going to do
We are going to create a door with a lava texture, a trigger_hurt which will be parented to the door, and a logic_timer which will open the door randomly.

How to
Make sure you have your ground set up like that:



First, make a brush under the ground, give it a lava texture on top and make it a func_door. In it's properties, select up under move direction, then give it a name.



The lava will rise depending on it's own height, so duplicate the func_door just above itself and see if it has the right height. If not, change the size of the lava brush.



Now, duplicate the lava brush, make it a trigger_hurt, set the damage to 200, set it's parent to be the lava brush, select both trigger and door, and press CTRL+G to groupt them. Now, at the top right corner, in the selection box, select object (not group), then select the trigger and put it at the exact same place as the door.



Now we have an good lava floor, but we need to implement the logic behind all that.

So first, create 3 ambient_generic entities. Set the volue to 10 and tick the flags Play everywhere and Start silent.
Name the first 2 ones lava_sound and the last alarm_sound. We are using 2 entities for the lava sound to make it louder, you can add/remove one to change the volume. Select the sound you want in the sound browser.




Now, create a logic_timer, name it lava_timer (only if you want to be able to play/stop it on demand), set Start Disabled to Yes if you want to start it manually (with a trigger or a button), else set it to No, set Use Random Time to Yes, Minimum Random Interval to 15, and Maximum Random Interval to 30. These are the values between the lava will rise randomly, feel free to modify them to suit your map.


Now go in the output tab, create a first one like this, which will trigger the alarm:



And a second one like this, which will raise the lava after 2 sec (again, change this value for your map):



Finally, we need to play the lava sound when the lava rises. Select your lava func_door, go to the output tab and add one to play the lava sound very low:



And a second one to play the lava full volume:




There, you have a fully working basic lava floor map!
Complex lava floor
Demo map in workshop

Demo map in .vmf: (remove space after "mega.nz")
mega.nz /#!B0cTWajI!6kE3mlxU7SnbyU9lQETAAoHXh4G2ekwAHHoYVcEorD4

What we are going to do
We're going to use like in the basic lava floor, a trigger kill and a fun_door with a lava texture. But this time, we will have several doors, each with a different size (the bigger, the higher will rise the lava). Theses doors will randomly be opened and the trigger will be parented to the door opening. Also, for each height, we are going to play a different sound.

How to
Do just like in the section Basic Lava Floor, but do not give the trigger a parent and give the lava a name like lava1.




Next, duplicate the door at the exact same place, but make the duplicated version bigger on the up direction (if the door is 1 unit bigger in this direction, it will rise one unit higher). Give it a name like lava2. Repeat this process until you have the desired number of lava heights.



Now we will create all the needed entities
Create a logic_case, give it a name, then as much logic_relay as you have created doors (make sure Start Disabled is set to No), give them names like lava_relay1, lava_relay2...
Then create as much ambient_generic as logic relays, and give them names (alarm1, alarm2...), these ambient_generics are the different alarms for each lava height, so give them different sounds, if you followed the basic lava section, delete the old alarm entity.
And of course, you must have the logic_timer and the lava sound ambient_generic just like for the basic lava.



Now we will create the outputs
Open the logic relay and create 2 outputs (remove any existing ones), one which will play the lava sound, and one which will trigger the logic case.


Now on the logic_case, create as much outputs OnCaseX as you have logic_relays, to trigger them.


And on each relay create outputs to play the alarm sound, set the trigger_hurt's parent to the opening lava door, and a last output to open this door.


There, you have a working complex lava floor!
Optional: weapon pickup
If you want to restrict the player to some weapons, you can make weapon pickups around the map. For example, in my first map, I placed some pistol pickups.

See the .vmf of the demo.

What we are going to do
We are going to create a trigger which, on trigger, will disable itself, use a game_player_equip to give the weapon to the player, and enable a logic_timer which will reactivate the trigger after some time. Also, to tell the player there's a pickup, we'll create a prop_dynamic (you can use the glowing one), parented to a func_rotating to make it more visible.


How to
First, make a simple brush on the ground to tell the player there is a pickup here (be sure to make the brushes func_detail).


We will first create all the entities needed then start working on the outputs
Just above this brush, make a trigger, give it a name (eg: usp if you want to give the player an usp)
Create a logic_timer , give it a name (eg: restart_usp), and set the refire interval to 20 (change that to your map needs).
Create a game_player_equip, give it a name (eg: give_usp), in the flags tab, check Use Only and Only strip same weapons type, then disable smart edit, click on add, set as key the name of your weapon (eg: weapon_usp_silencer), and as value the number of ammo you want to give player (set it to something high, like 100 or 200 so it will fill the whole clip, it cannot go over the clip limit).


Then, create a prop_dynamic_glow(if you don't want it to glow, create a simple prop_dynamic), give it a name (eg: pickup_usp), set the property Does the prop glow by default to Yes, choose your glow color, enter the glow distance (1024 is good), select the glow style, set the collisions to Not Solid.



Now we will start working on the outputs
Select the trigger, add the output to disable the trigger itself, disable the weapon prop (if it glows, need Disable and Disable Glow), enable the logic_timer, play a sound for the player (create a point_clientcommand, give it a name, then use the input Command with the parameter override Play "path/to/your/sound"), then give the weapon to the player by using the Use input of the game_player_equip (it will be in red, but it's ok, it works).


Now, open the output tab of the logic_timer, add the outputs OnTimer, enable the trigger and the weapon prop, enable the prop glow, and disable the timer.


If you want to make the weapon rotate (for more visibility), in the ground, right below the weapon prop, create a brush, make it a func_rotating, change it's max roation speed to a value you like (180 is good), and set the volume to 0.


There, you now have a fully working weapon pickup!
Advices
Create different visgroups for the trigger_hurts, and the different lava func_doors to easily select them, and group the trigger and the lava func_doors together. Also, group all the parts of the weapon pickup together.
To select only one entity, on the top right corner in the selection box, choose object.

Change the .vmt of the lava to be unlit, if you have trouble with the lava being completely black.


Here is the config file I used to make the first map:
sv_gravity 800 sv_deadtalk 1 sv_alltalk 1 sv_auto_full_alltalk_during_warmup_half_end 1 sv_ignoregrenaderadio 1 mp_radar_showall 0 bot_quota 0 mp_teammates_are_enemies 1 mp_limitteams 0 mp_roundtime 10 mp_maxrounds 1 mp_freezetime 3 mp_warmuptime 60 mp_warmuptime_all_players_connected 0 mp_death_drop_grenade 0 mp_death_drop_gun 0 mp_free_armor 1 mp_forcecamera 0 mp_force_pick_time 0 mp_display_kill_assists 0 mp_give_player_c4 0 mp_maxmoney 0 mp_afterroundmoney 0 mp_respawn_on_death_ct 0 mp_respawn_on_death_t 1 mp_respawn_immunitytime 15 mp_use_respawn_waves 0 mp_default_team_winner_no_objective 2 mp_ct_default_secondary "" mp_ct_default_melee "" mp_t_default_grenades ""


Adapt it for your map!
Downloads
RealWorld Texture Pack 2[www.tophattwaffle.com] by TopHATTWaffle

Demo map in workshop

Demo map in .vmf: (remove space after "mega.nz")
mega.nz /#!B0cTWajI!6kE3mlxU7SnbyU9lQETAAoHXh4G2ekwAHHoYVcEorD4