Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Help with Bool type alert

A topic by AppleSodaSoft created Aug 18, 2025 Views: 500 Replies: 2
Viewing posts 1 to 2

hi! a decker thing ive wanted to try and use is the Bool type alert modal, with the verb button. how do i check what's returned from it? i see from the documentation that it either returns 0 or 1 depending on which button is pressed, but i cant find out how to get that number in a script and react to it

(bonus question also, is it possible to change the text on the "Cancel" button?)

thanks!

(+2)

Here’s an example script that uses a “bool” modal:

 petting:alert["Do you want to pet the bunny?" "bool" "Pet"]
 if petting
  alert["The bunny basks in your affection."]
 else
  alert["The bunny wanders off, looking for carrots."]
 end

The documentation says “Prompt the user with two buttons, “Cancel” and a verb given by x (or "OK", by default).” so I’m pretty sure you can’t change the “Cancel” text.

If you want the player to choose between options with no “I clicked the wrong button, get me out” option, like in a visual novel, you might be interested in the Dialogizer library, which lets you show visual-novel style dialog boxes, including choices.

(+2)

mmh! gotcha gotcha! thank you!