game_player_equip Created 7 years ago2016-12-24 17:45:24 UTC by twitch1 twitch1

Created 7 years ago2016-12-24 17:45:24 UTC by twitch1 twitch1

Posted 7 years ago2016-12-24 17:45:24 UTC Post #332840
I created a game_player_equip entity and gave it the name game_player_spawn so it will give weapons every time a player spawns.

The weapons are available upon spawn but a pile of weapons is seen on the ground where the player spawned. How do i prevent that?

Entries in the game_player_equip look like this:

key: weapon_shotgun
value:1

key: weapon_crossbow
value: 1

key: ammo_crossbow
value: 1

there are more but value is always 1 and no duplicates
Posted 7 years ago2016-12-24 18:21:06 UTC Post #332841
My advice is dont try modify entities, that too much dont work fine
Mr. Cowboy Zombie Mr. Cowboy ZombieSemper fidelis
Posted 7 years ago2016-12-24 18:39:24 UTC Post #332843
You could move the entity behind the player, so he/she doesn't see the weapons, while being spawned.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 7 years ago2016-12-24 19:00:00 UTC Post #332844
There is only one entity... it is the game_payer_equip and since I named it game_playerspawn, it applies to the client every time they respawn. I didn't place anything at the actual spawns or near the actual info_player_deathmatch entities and I didn't modify an entity.
Posted 7 years ago2016-12-24 19:33:36 UTC Post #332847
The game will automatically apply all game_player_equip entities to spawning players if they don't have the "USE only" flag set: https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dlls/multiplay_gamerules.cpp#L551
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dlls/maprules.cpp#L815

Try setting that flag, it might be triggering them twice.
Posted 7 years ago2016-12-24 20:57:16 UTC Post #332849
Thanks, I will give that a try. I appreciate your time!
Posted 7 years ago2016-12-24 23:30:57 UTC Post #332850
im curious about this situation, i tried same thing for seeing what will happen. i not succeed on making same thing. is it posible to make an entity acts like another one?

edit: i found some info at http://twhl.info/wiki.php?id=1087
Posted 7 years ago2016-12-25 21:48:16 UTC Post #332852
Setting the flag "USE only" in the equip entity worked perfectly
You must be logged in to post a response.