Page 1 of 1

Reduced visibility during night time only

Posted: Wed Jan 04, 2017 11:20 am
by Paul59
Just a quick scripting question!

In many of my scenarios I have used the reduced visibility script from the vanilla Lutzen scenario. I am now designing a battle that starts during the night (2.30am) and goes on into the morning. How do I reduce visibility only for the hours of darkness?


Cheers


Paul

Re: Reduced visibility during night time only

Posted: Wed Jan 04, 2017 4:43 pm
by rbodleyscott
Paul59 wrote:Just a quick scripting question!

In many of my scenarios I have used the reduced visibility script from the vanilla Lutzen scenario. I am now designing a battle that starts during the night (2.30am) and goes on into the morning. How do I reduce visibility only for the hours of darkness?
Surround the reduced visibility code with a conditional statement so that it only functions before a certain turn.

e.g.

Code: Select all

if (GetTurn() < 13)
  {
     // Reduced visibility code here
  }

Re: Reduced visibility during night time only

Posted: Wed Jan 04, 2017 10:29 pm
by Paul59
Thanks Richard, that seems to have worked.

Re: Reduced visibility during night time only

Posted: Tue Feb 28, 2017 10:19 pm
by edward77
Richard, Is it possible to change the lighting with code?

Re: Reduced visibility during night time only

Posted: Wed Mar 01, 2017 7:21 am
by rbodleyscott
edward77 wrote:Richard, Is it possible to change the lighting with code?
What exactly do you want to achieve?

Re: Reduced visibility during night time only

Posted: Wed Mar 01, 2017 2:44 pm
by edward77
I am ok with changing visibility but how do you create the dawn effect with the light becomes gradually stronger in subsequent turns?

Re: Reduced visibility during night time only

Posted: Thu Mar 02, 2017 11:53 am
by rbodleyscott
edward77 wrote:I am ok with changing visibility but how do you create the dawn effect with the light becomes gradually stronger in subsequent turns?
I have no idea.

I noticed that happened with some scenarios by other designers, but I don't know how they did it.

Re: Reduced visibility during night time only

Posted: Sat Jun 09, 2018 12:24 pm
by Odenathus
Only just seen this so probably too late. I think it's built into the game, so the calendar says such and such darkness setting will show from e.g. four a.m. to six a.m., then another setting from six a.m. to eight a.m., then full daylight from eight a.m. to whenever, so you just need to adjust the time settings, and possibly the length of the game turns,all via the Calendar setting, to get the effect that you want. I think.