Reduced visibility during night time only

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
Paul59
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1814
Joined: Tue Jul 21, 2015 11:26 pm

Reduced visibility during night time only

Post by Paul59 » Wed Jan 04, 2017 11:20 am

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
Scenario Designer - Age of Belisarius, Rise of Persia, and Wolves at the Gate.

TT Mod Creator

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 22150
Joined: Sun Dec 04, 2005 6:25 pm

Re: Reduced visibility during night time only

Post by rbodleyscott » Wed Jan 04, 2017 4:43 pm

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
  }
Richard Bodley Scott

Image

Paul59
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1814
Joined: Tue Jul 21, 2015 11:26 pm

Re: Reduced visibility during night time only

Post by Paul59 » Wed Jan 04, 2017 10:29 pm

Thanks Richard, that seems to have worked.
Scenario Designer - Age of Belisarius, Rise of Persia, and Wolves at the Gate.

TT Mod Creator

edward77
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 192
Joined: Wed Nov 10, 2010 9:11 pm

Re: Reduced visibility during night time only

Post by edward77 » Tue Feb 28, 2017 10:19 pm

Richard, Is it possible to change the lighting with code?

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 22150
Joined: Sun Dec 04, 2005 6:25 pm

Re: Reduced visibility during night time only

Post by rbodleyscott » Wed Mar 01, 2017 7:21 am

edward77 wrote:Richard, Is it possible to change the lighting with code?
What exactly do you want to achieve?
Richard Bodley Scott

Image

edward77
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 192
Joined: Wed Nov 10, 2010 9:11 pm

Re: Reduced visibility during night time only

Post by edward77 » Wed Mar 01, 2017 2:44 pm

I am ok with changing visibility but how do you create the dawn effect with the light becomes gradually stronger in subsequent turns?

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 22150
Joined: Sun Dec 04, 2005 6:25 pm

Re: Reduced visibility during night time only

Post by rbodleyscott » Thu Mar 02, 2017 11:53 am

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.
Richard Bodley Scott

Image

Odenathus
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 283
Joined: Sat Jun 27, 2009 10:02 pm

Re: Reduced visibility during night time only

Post by Odenathus » Sat Jun 09, 2018 12:24 pm

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.

Post Reply

Return to “Scenario Design”