Force nighttime

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
Karinas23
Posts: 58
Joined: Thu Jul 24, 2014 8:57 pm

Force nighttime

Post by Karinas23 »

Hi i was wonder how i would force a map to always be nighttime, preferably without screwing up the passing of time for alchemist herb growth and all that
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

Re: Force nighttime

Post by NutJob »

Step one: Skuggs video tutorial has the hints, info you need to do this.

Step Two: Setup a global (let's say global_tick_tracker) to keep track of the ticks (movement, progression of time) and at (global_tick_tracker % number == 0) cycle through backpacks and increment the proper inventory (herbs).
User avatar
Doridion
Posts: 256
Joined: Tue Jun 10, 2014 9:23 pm

Re: Force nighttime

Post by Doridion »

NutJob wrote:Setup a global (let's say global_tick_tracker) to keep track of the ticks (movement, progression of time) and at (global_tick_tracker % number == 0) cycle through backpacks and increment the proper inventory (herbs).
Stupid i am, but what about the steps ? ( Time evolving when party is walking ) Isn't prefering making a loop around the GameMode.getTimeOfDay() ? Something like :

Code: Select all

function CatchTheNight()
   if GameMode.getTimeOfDay() < 1.04 or GameMode.getTimeOfDay() > 1.97 then
      GameMode.setTimeOfDay(1.041)
   end
end
Post Reply