I was wondering how to make it so when someone walks into a trigger they get a weapon.
I think thats possible by hammer… Rate me dumb
W/e, just remember that for next time. To do this just make a trigger and a point_clientcommand. Name the clientcommand “weapon”, and make this output on the trigger:
[um… this is like activate or something, just look at the options list you’ll see it]
With a parameter override of: give [name of weapon]
And mark fire once. that should work. It may need to be a point_servercommand, someone please just correct me if I’m wrong.
^^^Yeah what he said^^^
I did this with a point_servercommand and made it ontrigger weapon command give weapon_deagle and it gave it to the person who started the server not anyone else.
then use client… unless you already tried and it didn’t work of course.
try making a point_template that spawns a weapon and using the ForceSpawn input?
can you parent the template to the player? Otherwise it’d have to happen in a very specific spot. But yeah that would work.
Now that I think about it it probably would be in a very small location, so I guess it probably doesn’t even need to be parented. Nvm then. I still think the clientcommand would be the most foolproof way of doing it, however.
My method was just in case the command method did not work, the OP should try the point_clientcommand first
Not sure if this helps but I found this entity while browsing the wiki http://developer.valvesoftware.com/wiki/Game_player_equip
Thanks everyone i’ll try the clientcommand.
Make a point_template and a weapon where you want it, then make “ontrigger, template, forcespawn” the weapon will spawn where you placed it, make sure you named the gun and added that as “template 1” in the point_template. That’s the way I always do it, if you know of another way then use it I guess.
You’re a little late there, mah friend.
Oh you’re right, darn. :downs:
client command dosent work, ill go with the pointtemplate but its not want i really wanted
Wait, it should work. Can you tell me what does happen when it’s supposed to be triggered but doesn’t work? I mean yeah the template should work but I know for a fact, from personal experience, that the clientcommand works.
Well i made the client command, named it. Then a trigger and on the trigger i put onstarttouch clientcommand command give weapon_deagle and it only give it to the person who started the server(me) no one else when they go through.
damn… I know there’s way to do this… if only my Hammer worked. Nvm then, just use the point-template thing. I’ll get back to you if I remember anything.
^^^ This is the correct method.