Hello! And yeah absolutely!
For starters: referring to widgets by a shorter nickname. I think you were on the right track already, but I'll explain it in more detail anyway.
One option is to create a variable which is just the full path to a widget somewhere else in the deck:
doorknock: DormitoryHall1.widgets.DoorDepr
And that should make it possible to use "doorknock" as a shortcut for the longer name.
Or a project that has many info tracking widgets on a secret storage card could just simplify part of the path:
status:secretstoragecard.widgets
And then be able to use that in your scripts like this:
if status.pickedflower.value
And while you can define these shortcuts in the specific scripts where you're using them... you could also put them in the Deck-level script if you use them a lot. Just like Widgets and Cards can have scripts, you can also define events and variables at the Deck level.
Things put in the Deck script are always visible to every widget in the project (unless overridden more locally, but that's a different subject).
You can access this script with File > Properties > [Script...]
Or if you're already in a script editor for something else you can use File > Go to Deck to move there directly.
And this kind of nickname variable doesn't need to be in an event handler or anything, just define the variable and you're done.
Okay, now on to your real questions....
Just like a checkbox can hold 1 and 0 as true/false... other widgets are good at holding other kinds of information.
In this case I recommend a slider widget, specifically. They're very good at storing numbers within a specific range, and you can choose the minimum and maximum of that range, and how big of a step is allowed between each point on the slider.
They're my go-to widget when I'm keeping count of something!
I'd recommend setting the style of your slider to "Compact" in the properties dialog to make the number easier to read while you're testing, and then you can also set the min and max of the range of numbers you want to use.
A nice thing about using a slider for this job is that your existing script doesn't need to change much.
The current number stored in a slider is also called .value in scripts.
And you can adjust it by doing things you already understand how to do:
yourslider.value: yourslider.value +1
If you need to reset it back to the beginning you can just assign it the number you want to start at. Assuming that's zero at the beginning of the game, just do this:
yourslider.value:0
(And, as always, make the names match your actual project)
For the other part... It's true that we can't use combined operators but you can usually get the effect you need by writing things a little differently. I'm not completely sure all the ways you were thinking about using >= so this may not fully answer your question...
But for this script example... I think things could be simplified a little with the power of "else".
(I'm not copying your full script here so I'll just leave placeholders for the different scene possibilities, okay?)
if doorknock.value =1 # "Erm, Hello?" else # "...." end
Basically else is "If the condition wasn't true... do this other thing instead."
Or you could add more possible outcomes with elseif.
The first true thing in the series of possibilities will be the one that happens, so if two things could technically be true at the same time, make sure to put the higher priority one earlier in the list:
if doorknock.value =1 # "Erm, Hello?" elseif doorknock.value =20 # "Please stop knocking!!" elseif doorknock.value > 15 # "...!! >:O" else # "...." end
20 is more than 15, so the event for ">15" could have happened at value=20..... but =20 was earlier in the order of possibilities, so only that one will happen. It's kind of a silly example, but I hope it makes sense.
And while I'm thinking about it, you can also move your dd.open[] and dd.close[] lines to be before and after your branching dialog possibilities if you want. Like this:
on click do dd.open[deck] if doorknock.value =1 dd.say["Erm, Hello?"] else dd.say["...."] end dd.close[] end
I've got to stop here for now but I'm happy to come back and clarify if I wrote things in a confusing way, or if I didn't answer your real question!