Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(3 edits) (+3)

Hi, I have a question about alert when it can prompt for a string. Probably the most basic use case imaginable, how can I write that input into a widget? E.g.

alert ["What's your name?" "string"]

And then write that name to a widget called "field1" or something? Sorry if folks have answered this before, I found a few cool threads on logging text from a field but I genuinely couldn't find anything on how to use this for alert specifically.

(+3)

You can just say something like:

field1.text:alert["What's your name?" "string"]

Here’s an Ask button that asks the question, and sticks the response into a field:

%%WGT0{"w":[{"name":"field1","type":"field","size":[100,20],"pos":[154,108],"value":"blorp"},{"name":"button1","type":"button","size":[60,20],"pos":[174,74],"script":"on click do\n  field1.text:alert[\"What's your name?\" \"string\"]\nend","text":"Ask"}],"d":{}}
(+3)

Thank you! Those are perfect. I really appreciate it.