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.
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.