Skip to main content

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

Lil Programming Questions Sticky

A topic by Internet Janitor created Oct 28, 2022 Views: 14,390 Replies: 317
Viewing posts 98 to 99 of 99 · Previous page · First page
(+3)

This is going to be such a stupid question but I just feel so lost....how do I import an image to a canvas to use with dialogizer? Do I have to create the images in the canvas and lock it in Decker? If I try to import an image as is, it just becomes a static object I can't interact with after I'm done changing its size. 

(+3)

All questions welcome!

When you import an image into Decker, it has the selection box around it, right? And when you click outside the box, the image is placed on the back of the card.

But you can also copy (or cut) the image while it's still inside that selection box, switch to Widget Mode... and in the Edit menu select "Paste as new Canvas".

Personally I like to turn on the Toolbars (Decker > Toolbars) for this, to save a click while switching back and forth between importing/drawing and pasting my images into canvases.


Also, anytime your image is on the back of a card you can draw a selection box around it and then use the Edit menu option "Tight Selection" to shrink the selection to only contain your artwork.

(1 edit) (+2)

Hi! Probably basic question incoming, but I’m stuck…

I’m trying to track whether the player is wearing a cloak to display certain widgets or to send them to a specific card. I’ve created a checkbox for this, and when manually clicked on/off, the conditionals are tracked properly.

The issue I’m running into is that I can’t seem to change the value of that checkbox via Lil directly. As in, if the player click the Start button, the checkbox is enabled (because they wear the cloak at the start of the game), and if the player clicks the button “Hang Cloak”, the checkbox is disabled. Or it should be.

~~So far, I’ve tried:

Cloakroom.widgets.WearCloak.value:true

and

Cloakroom.widgets.WearCloak.value:true
Cloakroom.widgets.WearCloak.event["change" Cloakroom.widgets.WearCloak.value]

~~ I feel like I’m missing something but I don’t know what/how… EDIT: I FOUND THE ISSUE! I wrote true instead of 0/1….

Also, follow up question: if the display of the checkbox is “Invisible”, is the value of the Checkbox still accessible? (If not, I’ll just hide it behind some text :P )

Thanks in advance!

(3 edits) (+2)

As a follow up, I’ve tried creating variables too, but it didn’t work either.

I’m trying to make an invisible counter tracking the amount of time a player visited a card (and could be reset), so like a numerical variable…

EDIT AGAIN: Counters. That’s how it works. then add +1 to the text. Got it.

Developer(+1)

Just for the record, you can represent counters using a field widget via its .text or .data attributes, or alternatively you could use a slider widget via its .value attribute. Sliders are slightly more convenient than fields for representing numeric values within a known range, since their .value is always a number and is automatically "clamped".

Widgets set to "Show None" behave identically to visible widgets from a scripting perspective; they "remember" their contents across events and when the deck is saved. If there are any widgets whose contents you don't want preserved, you can mark them as Volatile. Sometimes volatile widgets are useful for "resetting" the state of a game.

Does that help clarify?

(+1)

It does! Thanks a lotT

Viewing posts 98 to 99 of 99 · Previous page · First page