-
Notifications
You must be signed in to change notification settings - Fork 118
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
feat: Server-side choice RUI #831
base: main
Are you sure you want to change the base?
Conversation
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.
This review is basically writing down what we discussed in VC yesterday. Very much looking forward to getting this merged :D
RegisterConCommandTriggeredCallback( "+scriptCommand1", Pressed_Choice1 ) | ||
RegisterConCommandTriggeredCallback( "+scriptCommand2", Pressed_Choice2 ) |
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.
scriptCommand1
/scriptCommand2
feel like placeholder names :P
Putting this back into draft until the requested changes are addressed so that I can have a better overview of which PRs need reviewing rn ^^ |
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.
So afaik NS voting bindings can be used for this feature, the issue being the RUI element having the key values ( [EDIT]: This can't be implemented as long as we don't have custom RUIs. |
Allows server to use conversation RUI on clients.
serverside_choice_v2.webm
TODOs
NSGetPlayerChoiceResponse
should return an enumBasic API
Detailed API
This function will return a key, that you must use with
NSGetPlayerChoiceResponse
to get players' answers to your choice.The
key
parameter can be used to ask several times the same choice to a given player (as long as they don't answer it, for instance).Return values:
Testing
sv_cheats 1
;script print(NSCreateChoiceOnAllPlayers( ["Yes, I would love to go on your quest!", "This sounds dangerous, I'll pass."], 10 ))
;NSCreateChoiceOnAllPlayers
returned key;script print(NSGetPlayerChoiceResponse( GetPlayerArray()[0], "YOUR_KEY_HERE"))
.