I wonder is there any possible kind of trigger to make a limit on producible units, without using slot blocking. Like, the player can produce kentrosaurus for level 2 slots, but can’t produce for example 3 more chariots....
Any ideas?
How to set up unit limit
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
- AnthonyCole
- - Admin -
- Posts: 2134
- Joined: Sat Apr 18, 2009 13:17 pm
Re: How to set up unit limit
There are TechTree limits you can set for a player. ("Filters") With them you can block a player from building certain things. You can also set these via triggers. Is that what you mean?
I've never seen code like this.
CEP Moddb | CEP download
ParaWelt TicTacToe | Multiplayer TicTacToe/Connect four/etc
CEP Moddb | CEP download
ParaWelt TicTacToe | Multiplayer TicTacToe/Connect four/etc
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to set up unit limit
That’s low detailed explain. More details needed. I made a trigger
Region all Playable map area, if more than 3 types of hu_warrior of player on map
Than do action Tech Anti Actions Lock hu_warrior from building
And it doesn’t work the way that planned.
It works only if I already produced 3 warriors, and than it’s disappears from barracks, until another trigger unlock it when, warriors reduces to lower than 3.
But if I have enough resources, I can order in baracks to produce 25 warriors, and they all will be produced, even if due the unit production trigger will lock for player ability to produce them...
Region all Playable map area, if more than 3 types of hu_warrior of player on map
Than do action Tech Anti Actions Lock hu_warrior from building
And it doesn’t work the way that planned.
It works only if I already produced 3 warriors, and than it’s disappears from barracks, until another trigger unlock it when, warriors reduces to lower than 3.
But if I have enough resources, I can order in baracks to produce 25 warriors, and they all will be produced, even if due the unit production trigger will lock for player ability to produce them...
- AnthonyCole
- - Admin -
- Posts: 2134
- Joined: Sat Apr 18, 2009 13:17 pm
Re: How to set up unit limit
In that case the server code (read: Mirage) should probably be fixed as to immediately cancel the production of units that are blocked by AntiActions. Like, fire an event when an AntiAction changes, and some code makes sure that any units currently in production that are disallowed based on the AntiAction are automatically cancelled. Then you could still queue 25 warriors, but as soon as the 3rd one pops out the queue will be emptied (and you get your resources back).
I've never seen code like this.
CEP Moddb | CEP download
ParaWelt TicTacToe | Multiplayer TicTacToe/Connect four/etc
CEP Moddb | CEP download
ParaWelt TicTacToe | Multiplayer TicTacToe/Connect four/etc
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to set up unit limit
Well that’s of course should be done, but I was wondering if there any other ideas of triggers to make it without coding or changing game files? That’s why I put in “Mapping”
Re: How to set up unit limit
or you simply delete any additional units (with trigger) at the moment they get produced, but then you don't get back resources ofc
- ParaworldFan
- - SEAS -
- Posts: 482
- Joined: Tue Nov 26, 2019 19:36 pm
- Location: Russia, Surgut
Re: How to set up unit limit
It will be visually seen on map, if doesn’t count army panel?