AI ambushers not spawning

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

AI ambushers not spawning

Post by SkinnyODST »

I`m quite sure I`ve done everything right but for some reason my AI ambushers refuse to spawn! I added -

ScriptCB_DoFile("Ambush")

AmbushTeam = 1
AMB = AmbushTeam

SetupAmbushTrigger("ambusherregion", "ambusherpath", 6, 1)

and

},
amb = {
team = AMB,
units = 6,
reinforcements = -1,
soldier = { "rep_inf_ep2_marine", 6, 6},

and they just will not spawn!

rep_inf_ep2_marine is in the ReadDataFile REP btw.

In ZE, I went into a custom layer and placed 6 nodes in a path called "ambusherpath" and made a region called "ambusherregion". I`m stumped as to why nothing happens when I enter the region. Does anyone know why this is happening? It`s really annoying me! I don`t see what I`m doing wrong, am I doing something wrong? Please tell me if you know how I may be able to fix this, thanks
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Re: AI ambushers not spawning

Post by Oceans14 »

Looks to me like your ambushers don't have any goals. Also looks like you never set which teams are friendly and which are enemies of the ambushers. Refer to the FAQ ambush tutorial, but also check your error log. I have seen ambush related errors appear before, so chances are you'll find a useful clue.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: AI ambushers not spawning

Post by Marth8880 »

After you created your new layer in ZE, did you remember to also click the "Update World REQ and Mode MRQs" button in the Game Modes window?

Image

Image
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: AI ambushers not spawning

Post by SkinnyODST »

Oceans14 wrote:Looks to me like your ambushers don't have any goals. Also looks like you never set which teams are friendly and which are enemies of the ambushers. Refer to the FAQ ambush tutorial, but also check your error log. I have seen ambush related errors appear before, so chances are you'll find a useful clue.
No they don`t, I added some but they still aren`t spawning
After you created your new layer in ZE, did you remember to also click the "Update World REQ and Mode MRQs" button in the Game Modes window?

Yeah I`ve done all that. The CP that I spawn in is from that layer so it all works.

I don`t know if only having 1 CP for the REP side would stop them from spawning. But I have another ambush set up and it works fine in a different mode, but in this mode they don`t spawn. All the necessary code for them is in both LUA`s but they even they don`t spawn in this other mode I`m working on
Post Reply