Skip to main content

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

Here's an at-a-glance selection of some ways to refer to different kinds of stored data in basic widgets, using attributes:

Buttons: .value (boolean true/false)

Fields: .text (plain text) .value (rich text) .data (LOVE data) or .images (images only) 

(it's a little visually chaotic but an interactive example of the difference between these four can be found here)

Canvases: .copy[] and .paste[]

Sliders: .value (the number it's currently set to)

Grids: .value (for the whole table), .rowvalue and .cellvalue

---

And to refer to a .value attribute of a widget on the same card:

widgetname.value

Or to refer to a .value of a widget on another card:

othercardname.widgets.widgetname.value

And if things have less script-friendly names you can refer to them with square brackets:

deck.cards["Silly Card Name"].widgets["I'm a Widget"].value

---

I hope this helps point you in the right direction!