Re: CAN you do this?
Posted by G4MER on
Thu Nov 6th 2008 at 10:57pm
Posted
2008-11-06 10:57pm
G4MER
floaty snark rage
member
2460 posts
360 snarkmarks
Registered:
Sep 6th 2003
Location: USA
Can I tie a target to reload a gun or drop a clip of ammo when shot or knifed? I have this Laser Tag map I am building. I want to also strip each player of all weapons and then reissue them a set of armor and a pistol.
Can any of this be done, and how?
Re: CAN you do this?
Posted by amanderino on
Fri Nov 7th 2008 at 12:48am
Posted
2008-11-07 12:48am
205 posts
21 snarkmarks
Registered:
Nov 13th 2006
Location: United States
Place a giant weapon strip trigger over the entire map. Set it to Only Once. On Trigger, trigger game_player_equip entity and set the values for the armor and pistol. I think the parameter is "Equip" or "Activate" I can't remember. Hammer will tell you that it's not a correct output but it will be correct in game.
I have to get off the computer right now (family needs on), but when I get back on later I can try to work it out in the editor for you and give you a thorough step by step. If you can't wait, I think interlopers.net has a tutorial for what you're asking.
As for the other thing, you'd probably need to create a mod to do so. I don't think you can do that with the I/O system in Source.. at least not as fluidly as you'd want/like if you can get it to work. I don't have any idea where to start on that, though.
Re: CAN you do this?
Posted by G4MER on
Fri Nov 7th 2008 at 5:56am
G4MER
floaty snark rage
member
2460 posts
360 snarkmarks
Registered:
Sep 6th 2003
Location: USA
Yeah I had an old Weapon Strip prefab I made way back before source and it does not work either.
Re: CAN you do this?
Posted by amanderino on
Fri Nov 7th 2008 at 6:46am
205 posts
21 snarkmarks
Registered:
Nov 13th 2006
Location: United States
Alright!
I've figured out how to change starting weapons:
1.) As I had said before, you still create a large brush over your entire map. It's not really important to name it, but you might want to just for organization.
2.) Create a game_player_equip entity. Name it whatever you'd like, you will need to refer to it in the I/O. After you've named it, turn off smart edit to input what you would like it to equip. To do this: Click "Add". Now you fill out the boxes here. In my little map, I had it equip an RPG. So, the key was weapon_rpg. and the value was 1. If you set a higher value it will spawn more RPGs. I believe that when it equips you with a weapon it gives you full ammo for said weapon. I do not know a way around this yet, and there may not be a way.
Next, go to the flags tab and check "Use only.".
Click apply and close.
3.) Lastly, set the Output for the trigger_weapon_strip like so:
My Output Named > OnStartTouch
Target Entities Named > (name of the game_player_equip)
Via This Input > Use
Apply and Close.
Note: Hammer will try to tell you that Use is an incorrect Input for the game_player_equip entity by turning the Use command red in the Via This Input box. It is a liar. It works fine in game.
Re: CAN you do this?
Posted by amanderino on
Fri Nov 7th 2008 at 5:04pm
205 posts
21 snarkmarks
Registered:
Nov 13th 2006
Location: United States
That's a trigger that allows you to get the ammo for a weapon when you pick up a weapon. It's setup for the game_player_equip is the same (you don't have to modify your fgd) but the method of triggering is different. In the example I wrote, I use the entity to replace the starting weapons for HL2DM (although, you can do this in any Source game that has these entities).
I've once seen a similar tutorial as the one found on the link you've posted. It's results were to make weapon and item pickup similar to that in survival horror games; where you'd have to "Use" the item in order to pick it up. I'm sure you can figure out how this is done, it's really not that complex. Hope that gives you some extra ideas to think about.
Re: CAN you do this?
Posted by G4MER on
Wed Nov 19th 2008 at 6:17pm
G4MER
floaty snark rage
member
2460 posts
360 snarkmarks
Registered:
Sep 6th 2003
Location: USA
Amanderino,
Thanks for your help, I tried to do what you said but it did nothing.
I found out that if you just add the game_player_equip and no buy zones, it will only give those weapons in your list... nothing else.. so it acts as both a weapon strip and a weapon equip.
Re: CAN you do this?
Posted by G4MER on
Wed Nov 19th 2008 at 8:58pm
G4MER
floaty snark rage
member
2460 posts
360 snarkmarks
Registered:
Sep 6th 2003
Location: USA
You don't need to tell me.. I told you. I got it to work the way I wanted it too and its so much simpler and easy than it was before. One little entity does the whole thing with out the brush and all that crap you spelled out to do.
Re: CAN you do this?
Posted by amanderino on
Wed Nov 19th 2008 at 9:15pm
205 posts
21 snarkmarks
Registered:
Nov 13th 2006
Location: United States
I had forgot to mention that it's not the same for Counterstrike. :P