-
Notifications
You must be signed in to change notification settings - Fork 141
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
Ported trigger_userinput from Momentum Mod #389
base: develop
Are you sure you want to change the base?
Ported trigger_userinput from Momentum Mod #389
Conversation
oh yeah one thing i forgot mapbase has that momentum doesnt is a third tertiary attack, idk if its possible to add easily but might be cool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this trigger would be welcome in Mapbase overall, but I'm uncertain of the way it was implemented.
While you're free to address or respond to the points I raised, I'm interested enough that I would be alright with fixing this up myself in the future if you would prefer to move on from this.
enum Key | ||
{ | ||
KEY_FORWARD = 0, | ||
KEY_BACK, | ||
KEY_MOVELEFT, | ||
KEY_MOVERIGHT, | ||
KEY_JUMP, | ||
KEY_DUCK, | ||
KEY_ATTACK, | ||
KEY_ATTACK2, | ||
KEY_RELOAD | ||
}; | ||
int m_ButtonRep; | ||
Key m_eKey; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why this uses its own separate enum instead of allowing mappers to check button bits directly, but that's a question for Momentum Mod more-so than for this PR.
While I would prefer to keep functionality the same between the way it works in Mapbase and the way it works in Momentum Mod, I think it would make sense to allow for explicit button bits, especially if this may get extended to other buttons like +attack3. Perhaps there could be an alternate keyvalue to handle that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is any need for parity with another mod for such a stupid simple entity. If this entity is to be added, the empty base class and this enum should be removed. I suppose keeping this separate would make changes to the order of IN_BUTTONS
enum not break this entity, but that's really unlikely.
"Key" name is usually used for keyboard keys instead of player input buttons. "OnKey" outputs don't make much sense. "lookedkey" also sounds weird.
It seems more appropriate to have this as a point entity or an extension for game_ui instead of limiting it to a trigger. Mappers looking for something like this would certainly want to use it without a trigger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah i agree this pr just ports what Momentum Mod did i can modify this pr to make it be a point entity that just checks the players input or be an extension of game_ui
If there is anything else you guys would like me to do pls feel free to write it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is any need for parity with another mod for such a stupid simple entity. If this entity is to be added, the empty base class and this enum should be removed. I suppose keeping this separate would make changes to the order of
IN_BUTTONS
enum not break this entity, but that's really unlikely."Key" name is usually used for keyboard keys instead of player input buttons. "OnKey" outputs don't make much sense. "lookedkey" also sounds weird.
It seems more appropriate to have this as a point entity or an extension for game_ui instead of limiting it to a trigger. Mappers looking for something like this would certainly want to use it without a trigger.
also I just realized that this trigger works with multiple people unlike the game_ui entity which is needed for each player on a map
if you got any code suggestions pls feel free to write em here
… CTriggerUserInput
This PR Ports the trigger_momentum_userinput trigger from Momentum Mod from mom_triggers.cpp
this allows you to check if a user has:
the fgd should look like this:
PR Checklist
develop
branch OR targets another branch with a specific goal in mind