biblo Posted October 1, 2012 Share Posted October 1, 2012 i change a hat item into a earring. i have it using ifininterior to turn on a cat eye effect if i enter a building. How can i get it to come on if it is night time when i am outside? I figure it is something to do with gettime. but not sure. Link to comment Share on other sites More sharing options...
Deleted2547005User Posted October 1, 2012 Share Posted October 1, 2012 Yep, GetGameHour is probably your best bet. Generally it should look like this: If GetGameHour => 20 && GetGameHour <= 6 Link to comment Share on other sites More sharing options...
biblo Posted October 1, 2012 Author Share Posted October 1, 2012 Yep, GetGameHour is probably your best bet. Generally it should look like this: If GetGameHour => 20 && GetGameHour <= 6 can i do this thru item effect or have to right a script? Link to comment Share on other sites More sharing options...
Deleted2547005User Posted October 1, 2012 Share Posted October 1, 2012 My last comment was wrong - there is no GetGameHour - the proper command is GetGlobalValue GameHour I think you can do it through on an item effect through conditions. Same applies so it would be: GetGlobalValue GameHour >= 20 andGetGlobalValue GameHour <= 6 Link to comment Share on other sites More sharing options...
biblo Posted October 1, 2012 Author Share Posted October 1, 2012 that didn't work. I also tried GetCurrenttime and that didn't work either. Link to comment Share on other sites More sharing options...
Deleted2547005User Posted October 1, 2012 Share Posted October 1, 2012 Through the conditions? Link to comment Share on other sites More sharing options...
rickerhk Posted October 2, 2012 Share Posted October 2, 2012 You need to use || 'or' between the conditions. The scripting engine doesn't know you are crossing midnight. Link to comment Share on other sites More sharing options...
biblo Posted October 2, 2012 Author Share Posted October 2, 2012 GetGlobalValue GameHour >= 20 ORGetGlobalValue GameHour <= 6 OR Didn't work either, Link to comment Share on other sites More sharing options...
Astymma Posted October 2, 2012 Share Posted October 2, 2012 (edited) GetGlobalValue GameHour >= 20 ORGetGlobalValue GameHour <= 6 OR Didn't work either, That will ONLY work in a condition... to use it in a script you need... if GameHour >= 20 || GameHour <= 6 ;do your stuff here endif Inside a script, global values are accessed simply by name. In conditions, they're accessed using GetGlobalValue. GetGlobalValue does not work in a script. However, if this is a condition, what you posted and I quoted is a correct condition for checking if the game hour is between 8pm and 6am. Edited October 2, 2012 by Astymma Link to comment Share on other sites More sharing options...
Recommended Posts