From Savage Game Design Wiki
Jump to navigation Jump to search
← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Heyoxe
Argument(s): n/a
Effect(s): local


Opens up a modal dialog that allows for single or multiple choices.


[title, options, onExit, singleChoice] call VN_fnc_showMultipleOptionsModal
title: String - title of the vote
options: Array of String - options items are in format [title, action, arguments]:
onExit: Code - function called when a player exits the modal, a nested array is passed to the function. Nested array is as follow: [_this: See OnUnload EH, _selected: Array of selected option indexes]
singleChoice: Boolean - (Optional, default true) if set to true, options act like a radio button (only one option can be selected); false allows to select multiple options.
Return value
Boolean - true if the dialog was successfully created. Empty title or no options will return false


Example 1
[ "Do you like pineapple on pizza?", [ ["Yes", { systemChat str _this; }, []], ["No", { systemChat str _this; }, []], ["No, but I never tried", { systemChat str _this; }, []], ["Yes, but I never tried", { systemChat str _this; }, []], ["I am neutral", { systemChat str _this; }, []] ], { systemChat str _this; }, true ] call VN_fnc_showMultipleOptionsModal;