I know that SetUnitCount(?, ?) sets the amount of units on the battlefield, so I tried putting it in a script, to change the unit count around a bit. For instance, you could start off with a unit count of 5 for a team and then go straight to 20 after the first objective. Problem is, it doesn't work because this:
sets it as a default. I can't get rid of that line because it crashes the map. I also tried changing the unit count to -1 but that also crashes the map.
I know there are work-arounds but I was wondering if this method was possible at all?
Re: Changing unit count mid-way through a script?
Posted: Wed Jan 06, 2010 8:01 pm
by [RDH]Zerted
It should work... Are you sure your script was working?
Re: Changing unit count mid-way through a script?
Posted: Wed Jan 06, 2010 9:31 pm
by ThePanda
Have you got SetUberMode (correct me if wrong) in your LUA?
I read somewhere that it breaks SetUnitCount.
Re: Changing unit count mid-way through a script?
Posted: Thu Jan 07, 2010 3:51 am
by sampip
[RDH]Zerted wrote:It should work... Are you sure your script was working?
I'll give it another go just to check, I might have forgotten to do something.
ThePanda wrote:Have you got SetUberMode (correct me if wrong) in your LUA?
I read somewhere that it breaks SetUnitCount.
SetUberMode breaks the max unit count on the battlefield, it just means you can have over 32 units on the battlefield.
Re: Changing unit count mid-way through a script?
Posted: Thu Jan 07, 2010 4:17 am
by ThePanda
sampip wrote:
ThePanda wrote:Have you got SetUberMode (correct me if wrong) in your LUA?
I read somewhere that it breaks SetUnitCount.
SetUberMode breaks the max unit count on the battlefield, it just means you can have over 32 units on the battlefield.
Yeah I know that , it's just I thought I read somewhere that SetUberMode also prevents SetUnitCount from working correctly too for some reason.
I also have this problem with changing the unit count, so any help would be gold.
Re: Changing unit count mid-way through a script?
Posted: Thu Jan 07, 2010 1:30 pm
by sampip
If you read what I did in my first post, Zerted said that should work. Presumably you are doing this for a campaign?