Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

What you're describing sounds like it ought to work. I would recommend making sure you have the script on the correct widget and checking carefully for typos. If it helps, here's a GIF of building the arrangement you describe from scratch:


It is not possible to embed widgets in rich text fields: they can only contain text (in multiple fonts), some of which can be hyperlinks, and inline images. With some fancy scripting and/or animated patterns it is possible to animate inline images within rich text. Here's an example with an "animated" field:


The script on the field:

on view do
 i:first extract arg where arg..type="image" from me.value
 i.paste[ref.copy[].rotate[sys.frame*.05]]
end

If you want to create the appearance of widgets within a rich text field, there are a variety of ways you might approach it. You could simply draw a card background that looks like interspersed text and widgets. (Using "Edit -> Copy Image" on widgets copies an image of them to the clipboard that you can then paste to the background and edit with drawing tools.) You could position widgets on top of a rich text field. You could even build Contraptions that contain other widgets (or images of them) stacked on top of a rich text field. I would recommend starting simple.

Thank you so much for your response! It really helped clarify what exactly my problem is. The field that contains the link I want to click to produce this behavior is embedded within a custom contraption, and for some reason that is causing some hiccup in my attempts to override the default behavior. So far I have tried adding this code to the script for the custom contraption and adding this code to the script for the embedded field in the prototype, but no luck yet. I'll keep trying though!

Found a hot-fix to my problem! For anyone curious, I just had to go into the prototype and override the link function in the embedded field (while being sure to point outside of the prototype with something like "deck.cards.exampleCard.widgets.exampleContraption.toggle[]"). In any case, I am having a blast making this game and am excited to share when it's in a more complete state.  Also looking forward to the Decker Summer Jam!