Hidden/Spoiler:
Need a little more help with campaign ambush
Moderator: Moderators
-
Commander_Fett
- High General

- Posts: 847
- Joined: Fri Oct 17, 2008 9:59 pm
- Projects :: No Mod project currently.
Need a little more help with campaign ambush
Well, thanks to a genorous amount of help and patience from RepSharpshooter, I now have a working ambush, sort of. The AI now spawn (yipee!), but only seven spawn for some reason, and instead of attacking the player, they just stand absolutely still. My LUA refering to the side:
I've checked in ZE, there are 8 nodes on the path, but only 7 AI spawn. Can someone help?
-
ForceMaster
- Lieutenant General

- Posts: 737
- Joined: Fri Aug 08, 2008 11:27 pm
- Projects :: Tron The Grid
- xbox live or psn: No gamertag set
- Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe
Re: Need a little more help with campaign ambush
I make a ambush in my map, the nodes begins with "node0"..."node1"..."node2"....
your "ambush_path" will be have max "node7".
hope this help you.
EDIT:
Try this friend:
Change this
to:
your "ambush_path" will be have max "node7".
hope this help you.
EDIT:
Try this friend:
Change this
Code: Select all
reinforcements = -1,Code: Select all
reinforcements = 0,-
theultimat
- Lieutenant General

- Posts: 679
- Joined: Sun Apr 13, 2008 1:39 pm
- Location: UK
Re: Need a little more help with campaign ambush
Hmm...I used a different code for my ambush...it's the code from the Geonosis scripts. Here's what it is (and note that this has been modified for my needs):
Then at the bottom of the LUA, where locals are normally set up:
Code: Select all
--Objective 4 - Kill the survivors
Scouts = TargetType:New{classname = "all_inf_rifleman_jungle", killLimit = 3, icon = "hud_objective_icon_circle"}
Objective4 = ObjectiveAssault:New{teamATT = ATT, teamDEF = DEF,
text = "level.cor1.objectives.campaign.2.C", popupText = "level.cor1.objectives.campaign.2.C_popup", AIGoalWeight = 0}
Objective4:AddTarget(Scouts)
Objective4.OnStart = function(self)
Ambush("scout_ambush_spawn", 3, 4)
AICanCaptureCP("cp2", DEF, false)
-- AICanCaptureCP("cp2", Scouts, false)
scouts_goal = AddAIGoal(4, "Defend", 100, "cp2")
end
Objective4.OnComplete = function(self)
ShowMessageText("game.objectives.complete", ATT)
DeleteAIGoal(scouts_goal)
endCode: Select all
--Setup scout ambush team
AddUnitClass(4, "all_inf_rifleman_jungle", 4)
SetUnitCount(4, 7)
SetTeamAsEnemy(4, ATT)
SetTeamAsEnemy(ATT, 4)