edited November 4 in Makinom Support
Hello,

I would like to control the time of the "Enviro" asset via a schematic of Makinom (to use it in Ork Framework)

extract from "Enviro":
Get current time:

int currentSecond = EnviroSky.instance.GameTime.Seconds;
int currentMinute = EnviroSky.instance.GameTime.Minutes;
int currentHour = EnviroSky.instance.GameTime.Hours;
int currentDay = EnviroSky.instance.GameTime.Days;
int currentYear = EnviroSky.instance.GameTime.Years;
float timeOfDay = EnviroSky.instance.internalHour;


Getcurrent sun and moon “time” based on position in sky (0-1):

float solarTime = EnviroSky.instance.GameTime.solarTime;
float lunarTime = EnviroSky.instance.GameTime.lunarTime;


Set time:

EnviroSky.instance.SetInternalTimeOfDay(float internalHour);
EnviroSky.instance.SetTime(int year,int day,int hour,int minute,int second);
EnviroSky.instance.SetTime(System.DateTime dateTime);

I just need to do a schematics autostart

I would like to associate it with this tutorial
http://orkframework.com/tutorial/gameplay/time-and-day/

You use Float variables in the tutorial and "Enviro" int variables.
I can do like "Enviro" put int and variable name = currentSecond, currentMinute, currentHour

Sorry I'm bad at coding


documentation enviro :
http://warlords-destiny.com/Enviro_Documentation.pdf
Post edited by avantis on
  • That should be doable with function nodes, e.g. to set the time you can use a Call Functionnode:
    - Is Static: enable
    - Class Name: EnviroSky
    - FunctionName: instance.SetTime
    Add 5 Int parameters for year, day, hour, minute and second, which can e.g. get their values from int or float variables.

    To store one of EnviroSky's values into variables, use a Store Field node, e.g. for seconds:
    - Is Static: enable
    - Class Name: EnviroSky
    - Field Name: instance.GameTime.Seconds
    - Is Property: I'd guess they're properties, so try enabling them, if you get a warning/error in the Unity console that no property is found, disable it
    It'll store the value into the defined variable, since these are int values, it'll automatically store them as int variables.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.