Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
How to use the AG3 Build Scripts
By [FoRcE]army_guy3
Explains how to use [FoRcE]army_guy3's Build Scripts.
   
Award
Favorite
Favorited
Unfavorite
Note: This guide is a work in progress
This guide is only public because I needed a place to put the model shortcut names. :o

I will set this guide up later but only after I get script basic functions done.
Shortcut Model names:
box1 = "models/props_junk/wood_crate001a.mdl"
box2 = "models/props_junk/wood_crate002a.mdl"
box3 = "models/props/cs_assault/washer_box.mdl"
box4 = "models/props/cs_militia/crate_extralargemill.mdl"
box5 = "models/props/de_nuke/crate_extralarge.mdl"
box6 = "models/props/de_nuke/crate_small.mdl"
box7 = "models/props_crates/static_crate_40.mdl"
box8 = "models/props_crates/supply_crate02.mdl"
box9 = "models/props_industrial/brickpallets.mdl"

boxstack1 = "models/props/cs_assault/box_stack1.mdl"
boxstack2 = "models/props/cs_assault/box_stack2.mdl"
boxstack3 = "models/props/cs_militia/boxes_frontroom.mdl"
boxstack4 = "models/props/cs_militia/boxes_garage_lower.mdl"
boxstack5 = "models/props/cs_office/paperbox_pile_01.mdl"
boxstack6 = "models/props_unique/spawn_apartment/boxes_rooftop.mdl"

powerbox1 = "models/props_lab/powerbox01a.mdl"
powerbox2 = "models/props_lab/powerbox02b.mdl"
powerbox3 = "models/props_lab/powerbox02d.mdl"

mailbox1 = "models/props/cs_militia/mailbox01.mdl"
mailbox2 = "models/props_street/mail_dropbox.mdl"

pizza1 = "models/props_fairgrounds/garbage_pizza_box.mdl"
pizza2 = "models/props_junk/garbage_pizzabox01a.mdl"

fireworks1 = "models/props_junk/explosive_box001.mdl"

armoreddoor1 = "models/props_vehicles/train_boxcar_shell_door_01.mdl"
armoreddoor2 = "models/props_vehicles/boxcar_tanktrap_door.mdl"

traincar1 = "models/props_vehicles/train_box.mdl"
traincar2 = "models/props_vehicles/train_box_open.mdl"
traincar3 = "models/props_vehicles/train_box_small.mdl"
traincar4 = "models/props_vehicles/train_boxwreck.mdl"

largepipe1 = "models/lighthouse/props/junkyard_big_pipe.mdl"

bookshelf1 = "models/props/cs_office/bookshelf2.mdl"

filecab1 = "models/props/cs_office/file_cabinet1.mdl"
filecab2 = "models/props/cs_office/file_cabinet2.mdl"
filecab3 = "models/props/cs_office/file_cabinet3.mdl"
filecab4 = "models/props/cs_office/file_cabinet1_group.mdl"

painting1 = "models/props/cs_office/offpaintinga.mdl"
painting2 = "models/props/cs_office/offpaintingb.mdl"
painting3 = "models/props/cs_office/offpaintingd.mdl"
painting4 = "models/props/cs_office/offpaintinge.mdl"
painting5 = "models/props/cs_office/offpaintingg.mdl"
painting6 = "models/props/cs_office/offpaintingi.mdl"
painting7 = "models/props/cs_office/offpaintingj.mdl"
painting8 = "models/props/cs_office/offpaintingk.mdl"
painting9 = "models/props/de_inferno/picture1.mdl"
painting10 = "models/props_furniture/picture_frame1.mdl"
painting11 = "models/props_furniture/picture_frame2.mdl"
painting12 = "models/props_furniture/picture_frame4.mdl"
painting13 = "models/props_furniture/picture_frame6.mdl"
painting14 = "models/props_furniture/picture_frame7.mdl"
painting15 = "models/props_furniture/picture_frame8.mdl"
painting16 = "models/props_furniture/picture_frame9.mdl"
painting17 = "models/props_furniture/picture_frame10.mdl"
painting18 = "models/props_furniture/picture_frame11.mdl"

shelf1 = "models/props/cs_office/shelves_metal.mdl"
shelf2 = "models/props/cs_office/shelves_metal1.mdl"
shelf3 = "models/props/cs_office/shelves_metal2.mdl"
shelf4 = "models/props/cs_office/shelves_metal3.mdl"
shelf5 = "models/props_furniture/shelf1.mdl"
shelf6 = "models/props_industrial/warehouse_shelf001.mdl"
shelf7 = "models/props_industrial/warehouse_shelf002.mdl"
shelf8 = "models/props_industrial/warehouse_shelf003.mdl"
shelf9 = "models/props_industrial/warehouse_shelf004.mdl"

table1 = "models/props/cs_office/table_coffee.mdl"
table2 = "models/props/cs_office/table_meeting.mdl"
table3 = "models/props/de_inferno/tableantique.mdl"

vendingmachine1 = "models/props/cs_office/vending_machine.mdl"
vendingmachine2 = "models/props_equipment/snack_machine.mdl"
vendingmachine3 = "models/props_equipment/snack_machine2.mdl"

haybail1 = "models/props/de_inferno/hay_bails.mdl"
haybail2 = "models/props/de_inferno/hay_bail_stack.mdl"

concretebags1 = "models/props/de_prodigy/concretebags.mdl"
concretebags2 = "models/props/de_prodigy/concretebags2.mdl"
concretebags3 = "models/props/de_prodigy/concretebags3.mdl"

spool1 = "models/props/de_prodigy/spool.mdl"
spool2 = "models/props_industrial/wire_spool_01.mdl"
spool3 = "models/props_industrial/wire_spool_02.mdl"


tirestack1 = "models/props/de_prodigy/tirestack.mdl"
tirestack2 = "models/props/de_prodigy/tirestack2.mdl"
tirestack3 = "models/props/de_prodigy/tirestack3.mdl"

woodpallet1 = "models/props/de_prodigy/wood_pallet_01.mdl"
woodpallet2 = "models/props_industrial/pallet01.mdl"
woodpallet3 = "models/props_junk/wood_pallet001a.mdl"

barrelpallet1 = "models/props/de_train/pallet_barrels.mdl"
barrelpallet2 = "models/props_industrial/pallet_barrels_water01.mdl"

barrier1 = "models/props_c17/concrete_barrier001a.mdl"
barrier2 = "models/props_fortifications/concrete_barrier01.mdl"

scaffold1 = "models/props_equipment/scaffolding.mdl"
scaffold2 = "models/props_equipment/scaffolding_norails.mdl"

flagpole1 = "models/props_fairgrounds/fairgrounds_flagpole01.mdl"

car1 = "models/props_fairgrounds/kiddyland_ridecar.mdl"

barrel1 = "models/props_industrial/pallet_barrels_water01_single.mdl"
barrel2 = "models/props_junk/barrel_fire.mdl"

flashlight1 = "models/props_lighting/flashlight_dropped_01.mdl"

door1 = "models/props_doors/doormain01.mdl"
door2 = "models/props_doors/doormainmetal01.mdl"
door3 = "models/props_doors/doormain01_small.mdl"
door4 = "models/props_doors/doormainmetalwindowsmall01.mdl"
door5 = "models/props_doors/doormainmetalwindow01.mdl"
door6 = "models/props_doors/doormainmetalsmall01.mdl"
door7 = "models/props_doors/doorboarded_window01.mdl"
door8 = "models/props_doors/doorglassmain01.mdl"
door9 = "models/props_doors/doorglassmain01_small.mdl"
door10 = "models/props_doors/doormain01_airport.mdl"
door11 = "models/props_doors/doormain01_airport_small.mdl"
door12 = "models/props_doors/doormain_rural01.mdl"
door13 = "models/props_doors/shackwall01.mdl"

doorsaferoom1 = "models/props_doors/checkpoint_door_-02.mdl"
doorsaferoom2 = "models/props_doors/checkpoint_door_01.mdl"
doorsaferoom3 = "models/props_doors/checkpoint_door_02.mdl"
doorsaferoom4 = "models/props_doors/checkpoint_door_-01.mdl"

freezerdoor1 = "models/props_doors/doorfreezer01.mdl"

doorsliding1 = "models/props_vehicles/boxcar_tanktrap_door.mdl"

stairs1 = "models/props_interiors/stair_metal_01.mdl"
stairs2 = "models/props_interiors/stair_metal_02.mdl"
stairs3 = "models/props_interiors/stair_metal_03.mdl"
stairs4 = "models/props_urban/hotel_stairs002.mdl"
stairs5 = "models/props_waterfront/stair_straight_80.mdl"
stairs6 = "models/props_exteriors/concrete_plant01_stairs_platform.mdl"
stairs7 = "models/props_exteriors/stairs_house_01.mdl"
stairs8 = "models/props_exteriors/wood_stairs_120.mdl"
stairs9 = "models/props_exteriors/wood_stairs_120_swamp.mdl"
stairs10 = "models/props_interiors/stair_treads_straight.mdl"
stairs11 = "models/props_urban/hotel_stairs001.mdl"

stairstep1 = "models/props_urban/stair_tread_concrete_01.mdl"
stairstep2 = "models/lostcoast/props_wasteland/cliff_stairs_1stair01.mdl"
stairstep3 = "models/lostcoast/props_wasteland/cliff_stairs_2stair01.mdl"
stairstep4 = "models/props_exteriors/wood_stairs_40.mdl"
stairstep5 = "models/props_exteriors/wood_stairs_swamp.mdl"
stairstep6 = "models/props_exteriors/wood_stairs_wide_48.mdl"
stairstep7 = "models/props_interiors/stair_treads_single.mdl"
Shortcut Model Names continued:
plate1 = "models/props_urban/metal_plate001.mdl"
plate2 = "models/props_street/traffic_plate_01.mdl"
plate3 = "models/lostcoast/props_wasteland/cliff_stairs_deck03.mdl"

pole1 = "models/props_urban/metal_pole001.mdl"

wall1 = "models/lighthouse/props/wall_144_324.mdl"
wall2 = "models/props_buildables/wall_barricade_helper.mdl"
wall3 = "models/props_buildings/collapsedbuilding01awall.mdl"
wall4 = "models/props_cemetery/crypts_wall.mdl"
wall5 = "models/props_doors/shackwall01.mdl"
wall6 = "models/props_doors/shackwall01_dmg01.mdl"
wall7 = "models/props_doors/shackwall01_dmg02.mdl"
wall8 = "models/props_doors/shackwall01_dmg03.mdl"
wall9 = "models/props_doors/shackwall01_dmg04.mdl"
wall10 = "models/props_fortifications/concrete_wall001_96_reference.mdl"
wall11 = "models/props_unique/zombiebreakwallinterior01_brick_dm_frame.mdl"
wall12 = "models/props_unique/zombiebreakwallinterior01_concrete_dm_frame.mdl"
wall13 = "models/props_urban/concreteblock_wall001.mdl"
wall14 = "models/props_urban/concreteblock_wall002.mdl"
wall15 = "models/props_urban/concreteblock_wall002_32.mdl"
wall16 = "models/props_urban/gate_wall001_128.mdl"
wall17 = "models/props_urban/gate_wall001_256.mdl"
wall18 = "models/props_urban/gate_wall001_64.mdl"
wall19 = "models/props_urban/gate_wall002_128.mdl"
wall20 = "models/props_urban/gate_wall003_128.mdl"
wall21 = "models/props_urban/gate_wall003_32.mdl"
wall22 = "models/props_urban/gate_wall003_64.mdl"
wall23 = "models/props_urban/gate_wall_gate001_64.mdl"
wall24 = "models/props_urban/gate_wall_gate003_64.mdl"
wall25 = "models/props_vehicles/freighter_windbreak.mdl"

barwall1 = "models/props_interiors/constructionwalls01.mdl"
barwall2 = "models/props_interiors/constructionwalls02.mdl"
barwall3 = "models/props_interiors/constructionwalls02checkpoint.mdl"
barwall4 = "models/props_interiors/constructionwalls03.mdl"
barwall5 = "models/props_interiors/constructionwalls04.mdl"
barwall6 = "models/props_interiors/constructionwalls04_frame.mdl"

wallset1 = "models/props_downtown/mansion_roof_wall.mdl"

foliage1 = "models/props_foliage/swamp_shrubwall_256_deep.mdl"
foliage2 = "models/props_foliage/swamp_shrubwall_256a.mdl"
foliage3 = "models/props_foliage/swamp_shrubwall_256b.mdl"
foliage4 = "models/props_foliage/swamp_shrubwall_512.mdl"
foliage5 = "models/props_foliage/swamp_shrubwall_512_deep.mdl"
foliage6 = "models/props_foliage/swamp_shrubwall_block_128_deep.mdl"
foliage7 = "models/props_foliage/swamp_shrubwall_block_256.mdl"
foliage8 = "models/props_foliage/swamp_shrubwall_block_256_deep.mdl"
foliage9 = "models/props_foliage/swamp_shrubwall_block_512.mdl"
foliage10 = "models/props_foliage/swamp_shrubwall_block_512_deep.mdl"

column1 = "models/props_cemetery/cemetery_column.mdl"

barricade1 = "models/props_c17/concrete_barrier001a.mdl"

button1 = "models/props_street/window_washer_button.mdl"
button2 = "models/props_buildables/arcade_button.mdl"
button3 = "models/props_mill/freightelevatorbutton02.mdl"

atlas1 = "models/props_unique/airport/atlas.mdl"

globe1 = "models/props_unique/airport/atlas_break_ball.mdl"

ammopile1 = "models/props/terror/ammo_stack.mdl"
ammopile2 = "models/props_unique/spawn_apartment/coffeeammo.mdl"
ammopile3 = "models/props/de_prodigy/ammo_can_02.mdl"
ammopile4 = "models/props/de_prodigy/ammo_can_03.mdl"
Using create command
The create command is based on my old ASQ SERVER sourcemod plugin's command.

With it you can spawn different kinds of props into the map for you to mess around with.

In this section we'll go over the different types and what they do.

"dynamic"

Chat example:
/create dynamic box1

The dynamic type is a basic prop with a model. You can move it, rotate it, and modify its properties. It does NOT support physics movement.

"physics"

The physics type is a more advanced prop with a model. You can move it, rotate it, modify its properties like the dynamic type but it supports physics movement.

Chat example:
/create physics box1

"door"

The door type rotates on its y axis. This allows you to make doors that open in and out.

Chat example:
/create door door1

"doorsliding"

The doorsliding type slides instead of rotating. This allows you to make doors that open side to side.

Chat example:
/create doorsliding freezerdoor1

"elevator" (elev)

The elevator type is a working elevator that takes you floor to floor.

Chat example:
/create elevator plate1
/create elev plate2

"minigun"

The minigun type is a M134 stationary weapon.

Chat example:
/create minigun

"50cal"

The 50cal type is a M2 Browning stationary weapon.

Chat example:
/create 50cal

"button"

The button type is used to allow the player to control different props. Currently it only can be connected to doors and elevators.

Chat example:
/create button button1

The button requires linking to the prop you want to control. More information on this later.

"ammopile"

The ammopile type is... a pile of ammo. Yup that pretty much sums it up.

Chat example:
/create ammopile
/create ammopile ammopile2

"weapon"

The weapon type creates every firearm, medkits, defibs, pills, adren, chainsaw, and grenades. This does not include melee weapons.

Chat example:
/create weapon m16
/create weapon g3
/create weapon ak47

The valid types can be found in the "Create Weapon Types" section.

"lasersight"

The lasersight type creates a stationary lasersight box.

Chat example:
/create lasersight
Create Weapon Types
This section contains the valid weapons for the create weapon command. Some weapons have shortcut names that can be used as well. these are separated into groups here so you know what goes to what.

adrenaline = "weapon_adrenaline_spawn"
adren = "weapon_adrenaline_spawn"
sticky = "weapon_adrenaline_spawn"

autoshotgun = "weapon_autoshotgun_spawn"

chainsaw = "weapon_chainsaw_spawn"

grenade_launcher = "weapon_grenade_launcher_spawn"
gl = "weapon_grenade_launcher_spawn"

hunting_rifle = "weapon_hunting_rifle_spawn"

pistol_magnum = "weapon_pistol_magnum_spawn"
magnum = "weapon_pistol_magnum_spawn"

pistol = "weapon_pistol_spawn"

pumpshotgun = "weapon_pumpshotgun_spawn"

rifle_ak47 = "weapon_rifle_ak47_spawn"
ak47 = "weapon_rifle_ak47_spawn"

rifle_desert = "weapon_rifle_desert_spawn"
desert = "weapon_rifle_desert_spawn"

rifle_m60 = "weapon_rifle_m60_spawn"
m60 = "weapon_rifle_m60_spawn"

rifle_sg552 = "weapon_rifle_sg552_spawn"
sg552 = "weapon_rifle_sg552_spawn"

rifle = "weapon_rifle_spawn"
m16 = "weapon_rifle_spawn"

shotgun_chrome = "weapon_shotgun_chrome_spawn"
chrome = "weapon_shotgun_chrome_spawn"

shotgun_spas = "weapon_shotgun_spas_spawn"
spas = "weapon_shotgun_spas_spawn"

smg_mp5 = "weapon_smg_mp5_spawn"
mp5 = "weapon_smg_mp5_spawn"

smg_silenced = "weapon_smg_silenced_spawn"

smg = "weapon_smg_spawn"

sniper_awp = "weapon_sniper_awp_spawn"
awp = "weapon_sniper_awp_spawn"

sniper_military = "weapon_sniper_military_spawn"
military = "weapon_sniper_military_spawn"
g3 = "weapon_sniper_military_spawn"
msg90 = "weapon_sniper_military_spawn"

sniper_scout = "weapon_sniper_scout_spawn"
scout = "weapon_sniper_scout_spawn"

molotov = "weapon_molotov_spawn"

pipe_bomb = "weapon_pipe_bomb_spawn"
pipe = "weapon_pipe_bomb_spawn"

vomitjar = "weapon_vomitjar_spawn"
bile = "weapon_vomitjar_spawn"

pain_pills = "weapon_pain_pills_spawn"
pills = "weapon_pain_pills_spawn"
nom = "weapon_pain_pills_spawn"

defibrillator = "weapon_defibrillator_spawn"
defib = "weapon_defibrillator_spawn"

first_aid_kit = "weapon_first_aid_kit_spawn"
medkit = "weapon_first_aid_kit_spawn"
How to make a working elevator
Elevators are more complex but I tried to make the process quite simple.

Before we start you need to understand the basics of floors. A floor is the height you want the elevator to stop at for this current floor.

By default the elevator creates two floors on creation. "floor_a" and "floor_b".

"floor_a" is base floor height of 0. This returns the elevator to its starting point height.

"floor_b" raises the elevator a height of 500 above base floor height.

The floor name is used to tell the elevator what is connected to where and what height it is.

With that out of the way..

Step 1:
First we need an elevator. We can make it using the following chat command:
/create elev plate1

This creates an elevator where you're looking with the model "plate1". You can use what ever model you like.

Step 2:
After we create our elevator, We need to select it using the selectelev chat command while looking at the elevator we want to select.

in chat:
/selectelev

Step 3:
After we select our elevator, we need to link it to something that can tell it what action to take.

For this we will create a button and link it.

in chat:
/create button button1

Step 4:
We created our button so it is now time to link it. Look at the button you created and type the following in chat:
/selectlink

This command will select that button as the link object. Link objects are required to use the setlink which we will use next.

Step 5:
Look at your elevator and type the following in chat:
/setlink elev floor_b

This will set your elevator to move to floor_b (or any other valid floor you name) when you press the button. You can repeat step 3 and step 4 with:
/setlink elev floor_a

To also make a button that goes back down to base floor height.

---------------
And you're done. This is the basic elevator operation, but I've programmed it to be more advanced as well allowing you to change floor heights and make new floors.

We will now go over the /elev chat command.

This command was designed to allow you to make more advanced adjustments to your elevator.

The elev command requires an elevator to be selected using the /selectelev chat command before it can be used.

Let's go over the features of this new command.

First we can see a list of this elevators floors using:
elev listfloors

Example:
/elev listfloors

This prints out a list of floors in chat.
---------------------
We can add a new floor with the following format:
elev floor add <floor name> <floor height>

Example:
/elev floor add boop 250

This creates a new floor with the name boop at height 250. Remember names CANNOT have spaces in them. After creating your floor it can be linked to a button by using it's floor name in /setlink .
---------------------
We can change the height of an existing floor using the following format:
elev floor changeheight <floor name> <new floor height>

Example:
/elev floor changeheight boop 89
---------------------
We can remove a floor with the following format:
elev floor remove <floor name>

Example:
/elev floor remove boop
---------------------
We can also set a test height for the elevator so we can fine tune what height to use before making the elevator floor using the following format:
elev goto_height <height value>

Example:
/elev goto_height 350

This would set the elevator's height to 350.
---------------------

And with that you're done with how to work the elevator. You can attach props to move with the elevator using the /setchild command. Just make sure that the elevator prop itself is the first in your selection.



How to parent props together
What is parenting?

Parenting means we are making an object the child of this object. Childs will move and rotate relative to their parent objects. With this we can attach objects to other objects including our elevators.


Using the system is simple.

Step 1:
Remember to clear your selection when starting new selections. You don't need to do this the first time but it's a good habit to avoid accidentally parenting the wrong objects.

chat command:
/selectclear

Step 2:
Look at the object you want as the parent object. For instance in the case of an elevator you'd want to look at the elevator prop first.

Now we add it to the selection using the following chat command:
/selectadd

This will be our parent object.

Step 3:
Look at object you want to be a child of the first object in selection. This means the prop you want to follow the parent prop.

Now we add it the selection using the following chat command again:
/selectadd

Note: Step 3 can be repeated with as many props as you want as a child of the first prop in selection.

Step 4:
Now we run the command that parents all these objects together by type:

/setchild

---------------
And with that you're done. These objects will now follow the parent object. If your parent object was an elevator then the script will automatically know to parent to the moving part of the elevator.
5 Comments
Zika_br123456 11 Aug, 2024 @ 11:50am 
Still working. But how to remove the props? :steamsad:
tabletka 25 Feb, 2022 @ 1:04am 
Thanks! An elevator works great!
[FoRcE]army_guy3  [author] 24 Feb, 2022 @ 5:28am 
I forgot to add that as a step in the guide. MB ;o
[FoRcE]army_guy3  [author] 24 Feb, 2022 @ 5:26am 
Remember, The script needs you to use /selectelev before using the elev command. If you don't select the new elevator then the old one will still be selected.
tabletka 24 Feb, 2022 @ 12:34am 
Hey. The first I create a simple elevator with floor_a and floor_b floors. It worked. But after any other elevator just doesn't work (with other floors too). What I do wrong?