Another way to equip weapons

03-26-2007, 12:46 AM
Equiping a player with a weapon using only map entities available in hammer is pretty far from ideal. After extensive research and testing this is as close to perfect as I can get. Its still definitly a little quirky. The embeded game logic wont allow certain classes to obtain certain weapons. For some reason you can not give more than one primary weapon (a major bummer). But with this setup the player can drop the primary after spending the mag and pick up another gun (with no extra clip). This set up will also allow you to give combinations of primary weapons/secondary weapons/secondary ammo/ or nades. Once the player is "full" on any item the weapons just spill out on the ground LOL!

This tut assumes you have a decent understanding of entities and how to add outputs. You'll need the custom .fgd from to make this a little easier. In this example the map will attempt to give the player 5 carbines (1 gun + 4 clips) and 2 frags at the same time the invisible zook is picked up. It works by spawning an invisible weapon_bazooka every 2 seconds with a logic_timer. I place a prop_dynamic at the spot where the invisible weapon is spawning. When the player picks up the invisible weapon, the prop is turned off. The game_equip_player is also fired upon weapon pick up. Then on a 2 second delay, turns the prop back on as the new invisible weapon is spawning.

OK enough explaining here's the entities with class info and I/O's I used:
I'm only listing settings changed, if not mentioned leave default

Example map found Here (


Class info
name: prop_zook01
WorldModel models/weapons/w_bazooka.mdl



Class info
name: weapon_zook01
fx amount 0
Disable shadows Yes
Dsiable recieving shadows Yes

OnplayerPickup - prop_zook1 - turnoff
OnplayerPickup - prop_zook01 - turnon - delay = 2.0
OnplayerPickup - equip_zook01 - Use



Class info
name: template_zook01
Template1: weapon_zook01



Class info
name: spawner_zook01
Point_template to spawn: template_zook01



Class info
name: logic_spawner
OnCase01 1


OnCase01 - spawner_zook01 - Forcespawn



Class info
Refire interval 3

Ontimer - logic_spawner - PickRandom



Class info
name: equip_zook01
(turn off smart edit)
weapon_m1carbine 5
weapon_frag_us 3

Its kinda tricky to figure out exactly where the template will be spawned, you'll have to adjust placement of the prop to line up with the invisible-spawning zook.

Repeat this for every weapon you want to give. I believe you can use the same logic_case by adding more OnCase outputs to the individual ent makers.

So... ya, I havent figured out how to give ammo with the zook. I tried adding weapon_bazookarocket 5 to the game_player_equip and nothing happens.

Questions, comments, concerns gladly welcomed


03-26-2007, 02:17 AM

03-27-2007, 02:09 PM
sorry guys, I know my tut isnt the greatest. Ive never done one before. Hell, Im still a total n00b mapper lol! Just wanted to point out the spawning-invisible-weapon method. thx

04-05-2007, 06:40 PM
Thanks for this info Beeron, I have started learning mapping over a month ago for source and have learned quite a lot myself. I just recent;y learned how to make flags to cap the way I want them and trying to get the water just right is sometimes a nightmare.

But I have been racking my brains to try and find out how to spawn weapons for players on my maps. Thank you for your help. :)

04-05-2007, 08:59 PM
:) np Punisher

I knew some new guy like me would like to know how to do this.

Remeber you can always copy/paste the stuff in my example map

04-08-2007, 01:22 PM
Beeron what's the sample map link partner? I just signed back on these forums a few days ago so I missed it. :)

Thanks again.

BTW I don't know if you liked the movie "The Alamo?" but I have been making a fun map called, "69th_the_alamo_mex" with the Alamo where Axis spawns and has to cap a 3 man cap across the width of the map which I set to 10 sec capping. all the while they have to work their way there through hedges and broken, smoking buildings trying to evade sharp shooters from the alamo itself.

Once the Axis gets closer they have to infiltrate the alamo and destroy the large wooden crates that is covering the tunnel strait down below the map and long ladder to a rock slab where they have to shoot or beat it to rubble to get through and then hit the 2nd 3-man cap below, this cap is 30 seconds to cap and it's going to be tough trying to keep the Allies from stopping the cap see?. But no grenades are aloud below or it would be pointless for the Axis. :D

I can post pics here later if you'd like? I hope if you respond that I get the notification, for some reason this reply of yours failed to come to my inbox?


04-08-2007, 08:02 PM
Beeron what's the sample map link partner?Thanks.

Its up in the first post

"Example map can be found here" ^^^

or this one

04-08-2007, 11:30 PM
Thanks again. I got the message in my inbox this time by George. :)
I'll take a look at it.


04-11-2007, 02:51 PM
Sooooo, did you get it working there Mike

04-11-2007, 09:09 PM
I went into your map and the zook worked fine for me, but I even copied and pasted into my own map with no results, I'll just have to work on it. Still new like yourself, still on trial and error basis, but I know a heck of a lot more than I did a month ago.
In fact my group has kind of jumped on the band wagon, we have around 9 or 10 that have been dabbing in map making so that makes me happy. :)


04-12-2007, 12:29 AM
Maybe you need to make sure the prop and the invisible zook are actually on top of each other. Chances are, its working but its spawning the item somewhere else in the map .My entities coordinates (since you copy/pasted) dont match your needed coordinates? I dont know

Get me on steam friends under l3eeron, Im always glad to help, I can walk you through step by step

04-12-2007, 09:36 AM
Thanks Beeron, I was very tired when I tried this last night and my mind was warped from 7 hours of mapping so I thought I'll try again today when my brain is rested LOL.

if I can't get it to work this time I'll hit you up. Do you have Skype?
My Skype name is Punish so I will let you know if I run into problems.

here is my new map I'm working on:


This is my newest creation, I have added a deep canal, and a 3 man Axis cap on the bridge.

I tried to fashion the Alamo to what it really looked like, at least from the outside.
I added some vines around the top of the fort.
There is a new type of tunnel I have tried out. It's a long sewer drainage pipe that goes through the canal to the other side and behind the small rock formation to exit out of. Then a rope will be on the far side of the fort to climb up.
There is a round hole carved into the top of the fort with another rope going inside.
There is only 2 ways inside the Alamo, the top and of course right through the front door.
The 5 top windows can be shot out but the 4 bottom ones stay in place, there was too many places to be able to defend against the Axis.

Once inside you have 3 cargo texture crates that has to be shot or smashed to show the tunnel strait down to the 2nd 3-man cap flag. Once this flag is capped it ends the round. But the kicker of these flags is this, they are not just 3 man caps, the 1st flag is 10 seconds but the one at the end is 30 seconds. At that time the Allies have to try and stop you from capping out.

Hope you like it? I am using a darker sky, but you can still see around real well. I am using natural lighting but yesterday was the best I ever had in trying it with light_environment, but when I compile the map in that lighting it takes so long for each face to hit that I decided not to add the sun until it's my last time to compile.

04-12-2007, 12:08 PM
looks like its coming along nicely Punish!

no I dont have skype, I have steam or msn, I also have a ventrilo server. Heres the server address and port

Only thing I saw from the shots is the ground looks too clean and straight...
make a displacement add some noise and alpha blending with prop_details

Here's some screenshots of my current project if anyone wants to check it out. I dont have a name for it yet. This is about 1/3 map. I might be done before the year 2010 - LOL!

04-13-2007, 08:13 AM
Nice map there, it's coming along.

No I have to be careful with some of my maps with displacement Beeron because I was making my great escape map and had 4 tunnels throughout the map and later when I tried to start displacement with the tunnels being underneath the ground it actually tore the ground open and I had a dickens of a time trying to get it back again. I even tried the sew tab to sew it and it nearly froze on me.

I'm nowhere near finished with the alamo, I have been adding cattails and other trees and grass to the ground plus I will be laying in some rubble, rocks, etc. so hopefully before long I will finish it. :)

keep up the good work on your map. It kind of reminds me of a summit near Normandy. :)

04-16-2007, 11:30 AM
...when you got a playable version playtest it with us over at =)

04-16-2007, 11:36 AM

and getting holes in displacements for tunnels isnt very hard...

let me know if I can help you here

the key to deisplacments is starting out with matching blocks that are touching (so they can sew together)

Use the clipping/vertex tools to cut out a square hole, (as illustrated in the link) then paint the geometery as needed

If you upload the .vmf I can do it for you

04-17-2007, 01:13 PM
I registered on your forums Beeron and was posting my map and pics and tried previewing 3 times to make sure it worked and then your forums banned me saying I was a spammer. I tried. :(

here is my map if you want to look at it?

This is what I tried posting over there:

I was racking my brains again trying to figure out why my map looked too much like old dod, and it hit me that the lighting was not activated yet.

I opened up the example flash map sdk and observed the main 3rd flag street area and I saw several icons for different things. I also noticed that the env_environment, env_sun, and a few other entities were right next to each other and at a low altitude, like 10 feet off the ground instead of way up high in the sky.

So I copied and pasted and when I complied the map I was in awe over how the transformation took place.

You already saw my old pics, now get a gander at these. Plus I saw the fire on the tank in flash and copied and saw how the flags worked with the fire entity and walla, I now have fire and a new type of smoke.
I also took out the ugly prop crates I made and made a stone wall covering the entrance to the flag below, plus I added lighting ins several places.

Take a look at the pics, and here is the link to the 2nd version:

extract here->

C: \Program Files\Steam\SteamApps\YOUR STEAM LOGIN EMAIL\day of defeat source\dod\maps folder

04-17-2007, 01:16 PM
Oh and thanks for the offer on the displacement and the tutorial it will come in handy. if I do get into any bad places I'll surely get in contact with you. :)

04-17-2007, 03:08 PM
ahhhhh now were talkin Punish!

looks like real dirt now, GJ

Im looking into your gettting banned on our forums, its weird, Ive never heard of anyone getting banned. BUT, I know if you try to post, then post again one second later you get a message saying "You can not post so soon, please try again later" Is that what you got?

Sorry for the bad start at our forums...
like I said, Ive never seen that before. The site admin is looking into it as I type this

04-17-2007, 04:06 PM
OK punish, we've unbanned you...

it was some kind of automated anti hack thing

We're still not sure why it banned you...

PLEASE try again =)

You sound like a cool guy, I think you'd like or little close-knit community

04-18-2007, 03:43 AM
I'll give it a shot Beeron thanks. :)

05-14-2007, 09:15 AM
Getting back on topic, has anyone had any luck with finding a way to distribute extra primary ammo?

05-14-2007, 11:19 AM

No entities available. ie no weapon_ammobar etc

If you figure out a work around let me know. I cant figure anything out on it.

05-15-2007, 01:26 PM
Beeron I don't know if you got my message or not? But a few days ago I tried to post my new map on your forum again and I always hit preview post first to make sure it went through and it said I was banned again for spamming wow. :)

05-15-2007, 01:49 PM
Beeron I don't know if you got my message or not? But a few days ago I tried to post my new map on your forum again and I always hit preview post first to make sure it went through and it said I was banned again for spamming wow. :)

No, I didnt get that message! OMG WTF! lol, this is getting irritating. Ill let you know if we can figure it out. We love new custom maps.

Have you playtested anywhere yet?

05-15-2007, 09:57 PM
Yes in fact we have it on our server now as well as Darklord uploaded it for download at :)

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.