Hi again
I want side 1,Team 5 to defend a line of wagons, so initially set them to 64. The line runs from 39,47 to 39,26.
After (if) the line is breached by any of Side 0 except light troops, Team 5 needs to be released to attack them wherever they are on general attack 16, + ignoring light troops 128: is this...
{
if(side==0)
{IfPlayerUnitIn(39,47,39,26,1)==1)
{MoveTeamCoord(1,5,-1-1,144);
}
}
}
Cheers
Defending a line
-
- Field of Glory 2
- Posts: 28052
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Defending a line
Looks about right to me. Try it and let me know if it doesn't work as you wish.Odenathus wrote:Hi again
I want side 1,Team 5 to defend a line of wagons, so initially set them to 64. The line runs from 39,47 to 39,26.
After (if) the line is breached by any of Side 0 except light troops, Team 5 needs to be released to attack them wherever they are on general attack 16, + ignoring light troops 128: is this...
{
if(side==0)
{IfPlayerUnitIn(39,47,39,26,1)==1)
{MoveTeamCoord(1,5,-1-1,144);
}
}
}
Cheers
Richard Bodley Scott
Re: Defending a line
No joy unfortunately, the BSF accepted the script after some wrestling with the right number of {, but it didn't affect Team 5's actions in the battle, they weren't triggered by Side 0's units entering that area..
Do I dimly remember from our P&S days that these areas can't be single lines, but have to be a box, i.e. at least one square wide/deep? I may be making that up.
Do I dimly remember from our P&S days that these areas can't be single lines, but have to be a box, i.e. at least one square wide/deep? I may be making that up.
-
- Field of Glory 2
- Posts: 28052
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Defending a line
Best email me the scenario and let me try it. Or at least the scripts.Odenathus wrote:No joy unfortunately, the BSF accepted the script after some wrestling with the right number of {, but it didn't affect Team 5's actions in the battle, they weren't triggered by Side 0's units entering that area..
Richard Bodley Scott
Re: Defending a line
I think "if(side==0)" should actually read "if(side==1)". That might be the problem?Odenathus wrote:Hi again
I want side 1,Team 5 to defend a line of wagons, so initially set them to 64. The line runs from 39,47 to 39,26.
After (if) the line is breached by any of Side 0 except light troops, Team 5 needs to be released to attack them wherever they are on general attack 16, + ignoring light troops 128: is this...
{
if(side==0)
{IfPlayerUnitIn(39,47,39,26,1)==1)
{MoveTeamCoord(1,5,-1-1,144);
}
}
}
Cheers
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: Defending a line
That was it Paul, Richard solved via a direct e-mail. Ta.