CAN you do this?

CAN you do this?

Re: CAN you do this? Posted by G4MER on Thu Nov 6th 2008 at 10:57pm
G4MER
2460 posts
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
amanderino
205 posts
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 amanderino on Fri Nov 7th 2008 at 3:02am
amanderino
205 posts
Posted 2008-11-07 3:02am
205 posts 21 snarkmarks Registered: Nov 13th 2006 Location: United States
I guess that you can't do that trick anymore. I've tried over and over again for the past hour to get that weapon_strip and game_player_equip to work together. Now it just throws everything everywhere and won't let me pick anything up. :roll:

Also, I couldn't find the tutorial that I thought was on interlopers.net. I guess it was never there to begin with. I'll try again tomorrow.. I want this to work again REALLY bad. I hate starting HL2DM with the SMG and Grav Gun. I think it destroys fun deathmatch.
Re: CAN you do this? Posted by G4MER on Fri Nov 7th 2008 at 5:56am
G4MER
2460 posts
Posted 2008-11-07 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
amanderino
205 posts
Posted 2008-11-07 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 G4MER on Fri Nov 7th 2008 at 8:59am
G4MER
2460 posts
Posted 2008-11-07 8:59am
G4MER
floaty snark rage
member
2460 posts 360 snarkmarks Registered: Sep 6th 2003 Location: USA
Re: CAN you do this? Posted by amanderino on Fri Nov 7th 2008 at 5:04pm
amanderino
205 posts
Posted 2008-11-07 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
2460 posts
Posted 2008-11-19 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 amanderino on Wed Nov 19th 2008 at 7:43pm
amanderino
205 posts
Posted 2008-11-19 7:43pm
205 posts 21 snarkmarks Registered: Nov 13th 2006 Location: United States
Well, I know that in FY_ maps, the weapons are normally just on the ground so that anybody on your team can pick them up or anyone in general. I can't remember; it's been a long time since I've played one (I thought a lot of the maps were bad :lol: ). I'm pretty sure the only thing you started with was Kevlar and a knife.. and maybe the Glock or USP. Again, it's been a long time and I'm currently reinstalling Steam on my computer in order to work on a mod, so I can't download it and tell you. Sorry.
Re: CAN you do this? Posted by G4MER on Wed Nov 19th 2008 at 8:58pm
G4MER
2460 posts
Posted 2008-11-19 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
amanderino
205 posts
Posted 2008-11-19 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
Re: CAN you do this? Posted by G4MER on Wed Nov 19th 2008 at 11:18pm
G4MER
2460 posts
Posted 2008-11-19 11:18pm
G4MER
floaty snark rage
member
2460 posts 360 snarkmarks Registered: Sep 6th 2003 Location: USA
LOL! :lol: