okay so, I'm trying to print the result of a dice roll to a dialogue in the event system. It always prints 0. Here are my steps:
1. I roll some dice using a formula, store the result in a variable using the "Formula to Variable" event node. I try storing it two different ways: 1a. As a Game Variable named X using the 'Set' operator 1b. As a Value named Y using the 'Set' operator
2. I have a custom print node i created, that prints the value of game variables to the console, i confirm that the dice roll works (example: 5). X prints as 0, Y prints as 5.
3. Next node is the dialogue node, the text reads: Result: #varifloatX# #varifloatY#
@gamingislove@Shadow_Fire okay, so here's something interesting... dug around in the source a bit and see that the TextHandler ReplaceSpecials() code only passes ORK.Game.Variables, which im assuming only contains global variables.
Changing X to a Global Value confirms this result. It prints the proper value, but not object values or local values.
Is this intended behavior gil? Or can we add support for local vars? Maybe #lvarfloatX#?
Yes, the text codes only support global variables in ORK.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
okay, so here's something interesting...
dug around in the source a bit and see that the TextHandler ReplaceSpecials() code only passes ORK.Game.Variables, which im assuming only contains global variables.
Changing X to a Global Value confirms this result. It prints the proper value, but not object values or local values.
Is this intended behavior gil? Or can we add support for local vars? Maybe #lvarfloatX#?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!