Forged Alliance Forever Forums
Moderator: Morax
McGeifer wrote:1. In the preview window of FA the starting positions of each player is outside of the map and I can't find the problem. The markes are set and the ACU spawns correctly ingame.
McGeifer wrote:2. I set some defense buildings (ARMY_9) over the map. Now I'm trying to ally these buildings with the two AI players (ARMY_3 & ARMY_4) so that these buildings attacking the human players (ARMY_1 & ARMY_2) but not the units from ARMY_3 & ARMY_4.
Well if so, I would take an ingame picture and replace it with the same name of course.
-- loop through armies
for i, Army in ListArmies() do
-- check if it's a human army
if (Army == "ARMY_1" or Army == "ARMY_2" or Army == "ARMY_3" or Army == "ARMY_4" or Army == "ARMY_5" or Army == "ARMY_6" or Army == "ARMY_7" or Army == "ARMY_8") then
ScenarioFramework.AddRestriction(Army, categories.WALL); -- don't allow them to build walls
ScenarioFramework.AddRestriction(Army, categories.AIR); -- don't allow them to build air stuff
-- loop through other armies to ally with other human armies
for x, ArmyX in ListArmies() do
-- if human army
if (ArmyX == "ARMY_1" or ArmyX == "ARMY_2" or ArmyX == "ARMY_3" or ArmyX == "ARMY_4" or ArmyX == "ARMY_5" or ArmyX == "ARMY_6" or ArmyX == "ARMY_7" or ArmyX == "ARMY_8") then
SetAlliance(Army, ArmyX, 'Ally');
end
end
SetAlliance(Army, "ARMY_SURVIVAL_ALLY", 'Ally'); -- friendly AI team
SetAlliance(Army, "ARMY_SURVIVAL_ENEMY", 'Enemy'); -- enemy AI team
SetAlliedVictory(Army, true); -- can win together of course :)
end
end
SetAlliance("ARMY_SURVIVAL_ALLY", "ARMY_SURVIVAL_ENEMY", 'Enemy'); -- the friendly and enemy AI teams should be enemies
Users browsing this forum: No registered users and 1 guest