Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

item_battery is not being given on game_player_equip #547

Open
HezusNL opened this issue Feb 21, 2024 · 1 comment
Open

item_battery is not being given on game_player_equip #547

HezusNL opened this issue Feb 21, 2024 · 1 comment

Comments

@HezusNL
Copy link

HezusNL commented Feb 21, 2024

On a game_player_equip, if you add the item_suit keyvalue first and the item_battery second, the battery will not be picked up. Only when the item_battery is added to the list ABOVE the item_suit, the battery is actually used.

The battery will be picked up if you trigger the setup from the first scenary a second time, but not initially.

@SamVanheer
Copy link
Collaborator

That's intended behavior dating back to the original Half-Life. Players can't pick up batteries if they don't have the HEV suit:
https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/items.cpp#L226

Keyvalue order can change if tools code changes things around so you shouldn't depend on that. I'd suggest using multiple game_player_equip entities triggered with delays to ensure the player is given the suit first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants