I want to setup a time calculation and transfer the values to my skybox but somethings wrong or missing...what I did is:
-Define the variables under Editor in ORKFramework
-created an Event for calculating the time:
I used the defined variables and selected Global. I have no Event Actor selected.
-I created a global event in the World Tab:
I selected the time event and used EventType Auto, Timeout 1, All states to ignore, available in all and no conditions.
So in my event every second 1 is added to variable MM (which stands for minutes -> 1 second is 1 Minute in the game, a day lasts 24 minutes...)
In my skybox script I'm trying to get the values:
Sky.Cycle.Hour = (int) ORK.Game.Variables.GetFloat("HH");
The (int) is needed cause the ORK variable is float and the scripts in the skybox use int.
If I use the command
ORK.Game.Variables.Set("HH", 12);
before I get the value it is changed to 12...otherwise HH=0, other Variables are 1 - could it somehow have to do with global/local variables?
Thank you very much for your help!
I'd need to see your event, maybe there is something wrong ... the rest should work as expected.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you want to directly define the variable key, use the value type Value :)
You can learn more details about this in this how-to on game variables.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!