You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
This will be my last issue that I was planning to add, so don't worry. :P
For scripting, it could be extremely useful if it's possible to have a function where you can make a message box popup. Where you can add in custom buttons (custom in a way that they have a custom text in them and clicking them will run your custom code).
This could look like this in code:
Actions.Buttonbox(Player,"Text in the message box");
Buttons.AddOption("Text in the button'){
//Code
}
Buttons.AddOption("Text in the button'){
//Code
}
Buttons.AddOption("Text in the button'){
//Code
}
So when pulling of the action Actions.Buttonbox(), all upcoming Buttons.AddOption() that were called in the same tick will be added into the message box with the buttons.
A great example what you can do with this, in combination with my issue where you have keys reserved for scripting, is that you canmake an ingame Alliance system. With a dedicated key you call in a buttonbox with the name of every player in the game. When clicking on them you can send an Alliance request. When doing that, the player that gets the request will get a button box where he can accept or deny the Alliance request.
The text was updated successfully, but these errors were encountered:
Kromster80
changed the title
Scripting: Buttons
MessageBox with custom buttons instantiated from dynamic script
Jun 18, 2017
dialog_id := Actions.ButtonBox(Player, "Text in the message box", "button1 text", "button2 text", "button3 text");
and corresponding event where dialog_id will be needed:
OnButtonBoxClick(aDialogId, aButtonId);
Note that unless we have a modal mode dialogs (which is not viable in MP yet), the events could never be fired, if player decides to ignore the dialog.
This will be my last issue that I was planning to add, so don't worry. :P
For scripting, it could be extremely useful if it's possible to have a function where you can make a message box popup. Where you can add in custom buttons (custom in a way that they have a custom text in them and clicking them will run your custom code).
This could look like this in code:
So when pulling of the action Actions.Buttonbox(), all upcoming Buttons.AddOption() that were called in the same tick will be added into the message box with the buttons.
A great example what you can do with this, in combination with my issue where you have keys reserved for scripting, is that you canmake an ingame Alliance system. With a dedicated key you call in a buttonbox with the name of every player in the game. When clicking on them you can send an Alliance request. When doing that, the player that gets the request will get a button box where he can accept or deny the Alliance request.
The text was updated successfully, but these errors were encountered: