Closed verillious closed 2 years ago
Hello @verillious. If I understood it correctly, you would like to have some variables that would always be set, regardless of block executed. Is that right?
I mean, currently if you do something like
{ set name = "npc_name", color = "red" }
== this_is_a_block
npc: %name% ....
The variables in the first line will only be available if the default block was executed. The idea is to have some kind of initial setup that is always ran. Did I get it right? What kind of workarounds are you doing?
You know what - I don't think this is really necessary! I just looked over my code and it's actually really simple to do what I want with the built-in stuff from the plugin!
I'd written a next_line()
function that did steps 2 and 4 "in one" so was forgetting I could do it this way.
So the workarounds I'd written were weirdly enough working around my own code 🤦♂️
I've just written a start()
function that goes through 2 3 and 4 and it's working perfectly. Tbh it makes me love Clyde even more (I already loved it a lot ;) ) I could maybe think of a reason to have some sort of "always - available" variable if pushed but it might just be adding unnecessary complexity.
Sorry for wasting time!
It's really nice of you to say that. Thanks. I'm glad you were able to find a solution.
It's not a waste of time at all, suggestions are always welcome, keep them coming :)
Good luck with your project.
it would be cool to be able to store certain variables when the
.clyde
file is parsed, or whenClydeDialogue.start()
is ran maybe something like{ global name = "npc_name", color = "red" }
etc.I'm currently trying to store a dictionary of character info in my
.clyde
files and this would reduce a lot of code workarounds!