Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

1. Correct.

2. This expression makes a local variable called "loc" which is the integer cast (adding zero to a string is one way to reinterpret it as a number) of splitting apart the text contents of the location field on commas. Put another way, this turns a string in that field like "2,3" into the pair of numbers (2,3).

A different, maybe more general, way of doing this might be

loc:"%i,%i" parse location.text

3. Correct. This expression is a bit complicated, so looking at it one step at a time in the Listener might be clearer. Assuming "loc" is (2,3), step by step,


4. Mostly. The phrase

(list "%i,%i")format 4 cross 4

Computes the names of every button widget:

("0,0","1,0","2,0","3,0","0,1","1,1","2,1","3,1","0,2","1,2","2,2","3,2","0,3","1,3","2,3","3,3")

The "widget.toggle[string bool]" method sets the .show attribute of the widget to the string if the bool is truthy, and otherwise "none".