Alert (pop up) from script command (sound or text)

Started by Bruno Kestemont

Bruno Kestemont Lv 1

What about "alert" or "pop up" commands in Lua?

I see 3 types of possible (script parametrable) pop ups:

-a sound (like a sound saying that a recipe is over)
-a pop up window with a text ("Warning: your backbone subscore is dangerously going down !")
-a view pop up (for example the view changes temporarilly to "view voids" when hiding becomes higher than a defined treshold)

It's just a way to inform the player with some "expert" judgment that we could embed in recipe outputs (in addition to log output). The advantage of a sound is that a client can request attention to a multiclient player for example. Or you play in the background of other activity and the game asks for your intervention.

For example:
-I can imagine a script that (optionally) selects the right view for a given puzzle
-an alert with a voice or a pop up saying "Ideality low !" when ideality goes down or "Disulfite bridge broken" or simply "Done" etc.

Like in many "war" games, where a voice or a popup says that we are nearly dead and should take time to recover health or monney …

jeff101 Lv 1

I was thinking about something like this the other day, but as a way to add comments to input windows within recipes. For several of the dialog functions (see https://foldit.fandom.com/wiki/Foldit_Lua_Functions#dialog_functions), like AddButton, AddCheckbox, AddSlider, AddTextbox, SelectBands, & SelectSegments, you could add an optional string variable called popup_text that would contain text to display on the Foldit GUI when the player hovers the cursor over one of the input tools. This would let recipes be more user-friendly and make the input windows less cluttered, because the recipe writer could put useful tips in the popup_text strings instead of in dialog.AddLabel lines. Having popup_text be an optional input variable will let old code that doesn't use this variable still work. The format for AddCheckbox, for example, could change from:

table dialog.AddCheckbox(string label, boolean value)

to:

table dialog.AddCheckbox(string label, boolean value, [string popup_text])

where the []'s mean that popup_text is an optional variable.