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
Reduced visibility during night time only
Moderators: rbodleyscott, Slitherine Core, Gothic Labs
Reduced visibility during night time only
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
-
- Field of Glory 2
- Posts: 28007
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Reduced visibility during night time only
Surround the reduced visibility code with a conditional statement so that it only functions before a certain turn.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?
e.g.
Code: Select all
if (GetTurn() < 13)
{
// Reduced visibility code here
}
Richard Bodley Scott
Re: Reduced visibility during night time only
Thanks Richard, that seems to have worked.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Re: Reduced visibility during night time only
Richard, Is it possible to change the lighting with code?
-
- Field of Glory 2
- Posts: 28007
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Reduced visibility during night time only
What exactly do you want to achieve?edward77 wrote:Richard, Is it possible to change the lighting with code?
Richard Bodley Scott
Re: Reduced visibility during night time only
I am ok with changing visibility but how do you create the dawn effect with the light becomes gradually stronger in subsequent turns?
-
- Field of Glory 2
- Posts: 28007
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Reduced visibility during night time only
I have no idea.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 noticed that happened with some scenarios by other designers, but I don't know how they did it.
Richard Bodley Scott
Re: Reduced visibility during night time only
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.