Making Weapons respawn intantly

Need Help? The Day isnt going so well on the Mapping front?
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

Oniyuri wrote:Damned! This is one classy mapper ^ :D
Damn straight! :D
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
User avatar
Hyperjag3
npc_strider
npc_strider
Posts: 604
Joined: Mon May 29, 2006 8:54 am
Contact:

Post by Hyperjag3 »

DaMaN wrote:
Matt wrote:
Hyperjag3 wrote:
Matt wrote:Does your PC need shock paddles? *Grabs them from BF2* I love the shock paddles... D:

Quick Question: The wiki is not clear enough, how can i make it for MUTI PLAYER OC, the user's have to press E on the "game_player_equip"?
I removed the "use" function on the game_player_equip entity because it is an invisible entity, and I don't know how you'd see it to use it. Instead, make a func_button, and add an output to the game_player_equip that tells it to EquipActivator. If you want it to immediately equip the players on spawn, name the game_player_equip "spawn_items_equip" or add it to a mapname_modify.txt like gtaiiilc said.
I'm honored that you spoke to such a mortal. :P

Thanks. Is there a way the "person" can only use it 1 time per spawn? So say we have 2 people.

Person A: I WANT MEH GUNS!!lol!!!11, So he goes to the picture of the guns, and presses E.

Person B. Comes along and does the same, both getting their weapons.

Now person A want's more. But he cannot get any, as it is a "one time use"
Then person a dies. (Too greedy, broke his finger hitting E)
Now he has respawned and he can get a new set of weapons from it. Is this possible?
Perhaps I can help with this dillema


Ok, so what I'm getting is that you want the players to spawn normally, then when they press E on a picture with a gun on it (or walk through a trigger), they pick up their guns and carry on slaughtering hoards of monsters. If they die, then they can get more weapons, otherwise they can't.

I'm unfortunately away from my home computer at the moment, but I'll see what I can do:

First, you'll need a button (or a trigger, but let's just go with a button for now). Let's call this button "button1". Make it look however you want, sound how you want, etc. Leave the outputs blank for now.

Next, you should probably make a spawn. So... do that.

After that, you need to make a game_player_equip entity. Let's call it "player_equip". Now, declare what weapons you want it to give the player. You can do this by clicking "SmartEdit" off, click "Add", then in the first textbox, type the name of the weapon/item (E.g. weapon_crowbar). In the other textbox (below the first), put the number of the weapon/item you want to give (E.g. 1). Finally, ensure that the "Use Only" flag is ticked.

Now you want to set up the input. For the button "button1", make a new output "OnIn" (or OnPressed or whatever). Set the target entity to player_equip, and leave the input blank! <-- This is critical! The game_player_equip entity is leftover from HL1 as legacy support, and really wasn't used in HL2. As such, the developers never got around to doing anything with the inputs/outputs. And since in HL1 there were no inputs, (you just had a target), there are no inputs in the HL2 version of game_player_equip.

So, what will happen: when the game_player_equip is targetted, it will give the player who originally triggered it whatever weapons are entered into it's values. If the player tries to trigger it again, nothing will happen, though other players can also trigger it. After the player dies, he/she can trigger it again to get the weapon(s).

Note: I have not thoroughly tested the game_player equip entity. I know for a fact that it will only give players a weapon once, until they respawn and trigger it again. However, I'm not positive about ammo or healthpacks or batteries (you could check this). But it works for weapons.


Also, if you merely have a game_player_equip entity set up in the map with the OnUse flag off (and with no inputs, etc), the players will spawn initially with whatever the game_player_equip has been entered with.

Hope that helps!
-DaMaN

P.S. Also, you cannot just directly press use on the game_player_equip entity itself, as it's invisible with no hitbox. The confusingly-named flag "On Use" refers to when the player should be equiped: as soon as they spawn, or when they trigger it.
That information is largely incorrect as I made major changes to the game_player_equip entity. It has inputs of its own (EquipActivator, EquipAllPlayers, maybe another, I don't remember). The "On Use" flag no longer exists either. I also don't understand why players couldn't trigger it multiple times anyway.
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

Hyperjag3 wrote:That information is largely incorrect as I made major changes to the game_player_equip entity. It has inputs of its own (EquipActivator, EquipAllPlayers, maybe another, I don't remember). The "On Use" flag no longer exists either. I also don't understand why players couldn't trigger it multiple times anyway.
Ahh, well I haven't used the OC fgd (yet!) so I was basing it off my experiance with Half life 2: Deathmatch. :wink:

I'm glad you've made those changes though. It will make it considerably easier to use the entity.
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
Svanrog
Combine Rebel
Combine Rebel
Posts: 1319
Joined: Tue Jul 25, 2006 9:17 pm

Post by Svanrog »

DaMaN, it seems you're going to be a quite good counterweight to Vasili. :)
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

Oniyuri wrote:DaMaN, it seems you're going to be a quite good counterweight to Vasili. :)
Thanks! (I think...)

Who is this Vasili guy anyways? He seems pretty 'well known' around here...
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
Svanrog
Combine Rebel
Combine Rebel
Posts: 1319
Joined: Tue Jul 25, 2006 9:17 pm

Post by Svanrog »

Yeah, he is wee known. If you want to know what he is well know for, check the "Released maps" section of the forum. ...and yes, it's a good thing to be a counterweight to Vasili. :)
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

Oniyuri wrote:Yeah, he is wee known. If you want to know what he is well know for, check the "Released maps" section of the forum. ...and yes, it's a good thing to be a counterweight to Vasili. :)
Hmm... I see.

Vasili: Good concepts, maps 'need work'. And always give creds. Period.

--

Anyways, I'm looking forwards to getting home and mapping some more so I can release some maps here! I'd also love to take a look at the OC fgd. I have been dying for new NPCs!! (Combine, Zombies, and Antlions get boring after a while). Bullsquids and houndeyes are always good fun, and I've been hearing things about tentacles, which are another favorite of mine :twisted:
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
Svanrog
Combine Rebel
Combine Rebel
Posts: 1319
Joined: Tue Jul 25, 2006 9:17 pm

Post by Svanrog »

Don't forget about the human grunts, snarks and gargantuas!

I think you will like mapping for OC. Everything is so easy to customize! (Like spawn items, npc health and much more)
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

Oniyuri wrote:Don't forget about the human grunts, snarks and gargantuas!

I think you will like mapping for OC. Everything is so easy to customize! (Like spawn items, npc health and much more)
Did you say... GARGANTUAS?!?!

Mwah ha ha ha... :twisted: :twisted: :twisted:


Oh, and npc health will be really nice. I usually have to change it through the console, and that can be a hassle sometimes.

Customizability is good. I think mapping for OC will indeed be quite fun. (Should be good for LAN parties too, something that I'm quite partial to :D )

Coop ftw.


Edit: Oh, and check out my other WIP map: http://www.obsidianconflict.com/forums/ ... .php?t=871
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
fragged131
npc_metropolice
npc_metropolice
Posts: 237
Joined: Sat Sep 23, 2006 2:25 am

Post by fragged131 »

We should have a map where the players have to take on a a pit full of snarks with just a crowbar. xD
Matt
Vertex
Vertex
Posts: 10
Joined: Sun Nov 05, 2006 10:05 pm

Post by Matt »

fragged131 wrote:We should have a map where the players have to take on a a pit full of snarks with just a crowbar. xD
And then when they finaly stop spawning, out of nowhere, 3-4 headcrab canister's fall from the sky, and launch... *dramatic music* Evil Zombie Kliners at you! :O

I finaly have a bit of time to work on this, so i'll see what i can do. Then during school, i'll probably think of things to do, etc...


Edit:
The file someone gave me to download, is from Japanese Yahoo, and i don't speak japanese, and the download gives me a 404 i belive. :o
Haii... D:
Zteer
Entity Master
Entity Master
Posts: 46
Joined: Sun Jul 30, 2006 5:34 am
Location: JAPAN

Post by Zteer »

I am sorry to be unclear.
Please paste URL on the address bar of a browser.
Post Reply