Ambush Not Working [Solved]

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
User avatar
KnightsFan
Second Lance Corporal
Second Lance Corporal
Posts: 108
Joined: Fri Mar 06, 2009 9:34 pm

Ambush Not Working [Solved]

Post by KnightsFan »

Yup, another of my LUA problems. My ambush isn't working. It was working earlier, but that was just testing. I changed the spawn path and now it stopped working.

Ambush code. Team COM has 1 class that I am sure works.

Code: Select all

SetupAmbushTrigger("com_trigger", "com_spawn", 3, COM)
I'm getting these errors in my log
Hidden/Spoiler:
Message Severity: 2
.\Source\Character.cpp(1217)
Trying to spawn a character with no class. Skipping this character. Perhaps the UnitClassCounts are too low?

Message Severity: 2
.\Source\Character.cpp(1217)
Trying to spawn a character with no class. Skipping this character. Perhaps the UnitClassCounts are too low?
WARNING: could not spawn all the ambushers...team is too small or there are too many dudes running around alive

EDIT: It started working again... mostly. Only 2 out of 3 of my guys are spawning. They are all the same class.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Ambush Not Working

Post by [RDH]Zerted »

It looks like you're not allowing enough units to spawn as that class. Remember, when you add a unit class to a team, you also set how many of them can run around ingame at any point in time.
User avatar
KnightsFan
Second Lance Corporal
Second Lance Corporal
Posts: 108
Joined: Fri Mar 06, 2009 9:34 pm

Re: Ambush Not Working

Post by KnightsFan »

Found my error. Apparently, it didn't like how the min and max of my units were 1. When I changed the max to 2, it worked like a charm.
Post Reply