Skip to main content

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

Normally the way I set up a style to reference in multiple places I'll just put it in the deck level script. Then it's in scope for wherever I'm referencing it in code. Depending on what you're doing, it could make more sense for the card level script, it's up to you

As an example, here's something I grabbed from an old project - this is just in the top level deck script, not inside any "on such and such do" events.

ddstyle:()
ddstyle.fcolor:colors.black
ddstyle.bcolor:colors.white
ddstyle.speed:3
ddstyle.border:deck.contraptions.border
ddstyle.next:image["%%IMG2AAgABwACAQYAAQEBJAUBAiQGAQIkBgECJAYBAiQFAQEAAQEGAAI="]
ddstyle.nextd:20

And then I can just call like dd.open[deck ddstyle] from anywhere.

I'm guessing the grid isn't working for you is because it's passing in like a string containing the text "deck.contraptions.bracket" instead of a reference to the actual bracket contraption.

(1 edit) (+1)

Thank you! I did try this earlier but I didn't know how to reference it ( was putting deck.ddstyle). It can handle the position! but it seems like it can't handle the size from calling dialoguewindow.size. (but I can just set the size manually since I have the measurements). Thank you so much!

(+1)

I think if you wanted to reference something off another object you'd need to do it in a card-agnostic manner, something like card1.widgets.dialoguewindow.size, if that helps