Visibility on Turn 1

Post Reply
Paul59
General - King Tiger
General - King Tiger
Posts: 3859
Joined: Tue Jul 21, 2015 11:26 pm

Visibility on Turn 1

Post by Paul59 »

rbodleyscott wrote:
Paul59 wrote:Hi Richard,

I'm designing a scenario including my trusty limited visibility script from the vanilla P&S Lutzen scenario. I have used it many times in my P&S scenarios, but it does not work from the start of this scenario. During player turn 1 the whole map is visible, the limited visibility does not kick in until I end the turn and the AI has it's first turn.

Has the required code changed? Or maybe I've mucked it up some how? I can post the code here or email it to you if required.
Try emailing it. I think Pip changed the flow somewhat.
I've just moved this post over from the Beta forum, where I first raised this issue a few days ago.

I've now redesigned the scenario so that there are hills and some forest between the two armies, and I have checked that this does indeed block the line of sight by using the LOS tool on all the Roman player units. But I can still see the Spanish/Carthaginian units when the scenario starts! So this might not be a visibility script problem.
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.
Paul59
General - King Tiger
General - King Tiger
Posts: 3859
Joined: Tue Jul 21, 2015 11:26 pm

Re: Visibility on Turn 1

Post by Paul59 »

To test if this is a visibility script issue, I have taken the script out. I can still see the whole battlefield and all the enemy units on turn 1. So it is nothing to do with the visibility script.
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.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28310
Joined: Sun Dec 04, 2005 6:25 pm

Re: Visibility on Turn 1

Post by rbodleyscott »

Paul59 wrote:To test if this is a visibility script issue, I have taken the script out. I can still see the whole battlefield and all the enemy units on turn 1. So it is nothing to do with the visibility script.
The script that hides the enemy deployment in custom battles is not used in scenarios - mainly because the historical dispositions can easily be seen in a book or on wikipedia.

Try putting something like this in StartTurnPost() in your scenario script

Code: Select all

if (GetTurn() == 0)
  {
    SetAreaLOS(x, y, x2, y2, side, 0);
  }
to cancel the LOS on the enemy deployment area.

If you can't make that work, send me the scenario and I will have a go.
Richard Bodley Scott

Image
Post Reply

Return to “Field of Glory II: Scenario Design”