Skip to main content

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

I’ve got another, probably totally silly question,  (I promise I look through all the documentation, the problem is that I’m basically illiterate in basic coding). As you’ll see in this video (how do you folks get those cool embedded videos to happen without using youtube?) I’m running a card script which evals the field on the left (called cardscript; yes i know the text above the field has a space, trust me it’s labled without the space).  I’ve defined a (dunno what to call it) thing called “fields” which I want to use as a bucket to hold all of the fields i wish to make invisible at when I click “eval below”.  As you can see, when I just define the thing as ’source’ it works, but when I add a comma and include ‘cardscript’, not only does it fail to include cardscript, but now source remains visible.

Secondary issue: The !alert works, but does not retain the richtext formatting.

(+1)

to get ahead of “why are you doing this in fields”, the answer is, “I’m trying to teach myself how to code AND how to code in Decker and it’s a ton of friction having to click back and forth between widgets and interact, into the card script etc. and theoretically, it shouldn’t matter provided I do this correctly."

(+3)

It's totally fine to be new and have questions! Decker is a pretty friendly environment to try things and figure them out. And I think most of the things that look like videos in the thread are actually gifs. I know I use a screen-to-gif recorder when I need to make a small example of something.

Okay, I think these are your main questions:

1) How can I make Decker use the whole list of widgets I defined earlier?

You just need a tiny change to how you're referencing them. You need two periods, instead of just one in this case.

fields..show:"none"

2) How can I make my !alert use my rich text formatting?

In-line commands run by dialogizer don't carry over any of the rich text features. I'm pretty sure they're just run as code.

However, you can point to another field's value inside of your !alert[] in the same way you point to source.value inside of dd.say[].

!alert[problem.value]

I know it's another step, and another thing to have to manage while you're editing but it should be pretty straightforward. 

Another thing that I think might help you sometimes is the ScriptViewer contraption. You can have it display the card script and let your edit it from your card in interact mode instead of having to use a workaround with eval. And because the ScriptViewer only displays scripts that exist elsewhere you can safely delete the ScriptViewer contraption when you're done.

Just another possibility, in case it helps!

(+2)

I’m just super appreciative of the work you put into helping me. I hope I can repay you or you vicariously through this community some day.