Skip to main content

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

Lil has three comparison operators: equal-to (=), greater-than (>), and less-than (<). The negation of these (the ! operator) is equivalent to not-equal-to, less-than-or-equal-to, and greater-than-or-equal-to, respectively:

 a = b  # a is equal to b
!a = b  # a is not equal to b
 a > b  # a is greater than b
!a > b  # a is less than or equal to b
 a < b  # a is less than b
!a < b  # a is greater than or equal to b

If you click on a button in interact mode, its script is evaluated and sent a "click[]" event, executing the code declared in "on click do ... end". Any code outside an "on ... end" event handler will execute any time ANY event is sent to that widget. Buttons normally only get click[] events, so technically you can give them a script like

go["Next"]

instead of

on click do
 go["Next"]
end

and it will behave the same in most cases, but the former version becomes a problem with other widget types, which are sent a wider variety of events in different situations.

If you mark any widget as "animated" it will be sent a "view[]" event 60 times per second. This offers one way of making widgets and contraptions that continuously update themselves or move around, if that's the sort of thing you're alluding to trying to accomplish.

Does that help at all?