How to set up unit limit

Post Reply
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

How to set up unit limit

Post by ParaworldFan »

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?
User avatar
AnthonyCole
- Admin -
Posts: 2134
Joined: Sat Apr 18, 2009 13:17 pm

Re: How to set up unit limit

Post by AnthonyCole »

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?
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to set up unit limit

Post by ParaworldFan »

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...
User avatar
AnthonyCole
- Admin -
Posts: 2134
Joined: Sat Apr 18, 2009 13:17 pm

Re: How to set up unit limit

Post by AnthonyCole »

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).
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to set up unit limit

Post by ParaworldFan »

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”😀
User avatar
MrMorgana
- Admin -
Posts: 947
Joined: Tue Aug 18, 2009 12:42 pm
Location: Koprulu Sector

Re: How to set up unit limit

Post by MrMorgana »

or you simply delete any additional units (with trigger) at the moment they get produced, but then you don't get back resources ofc :D
User avatar
ParaworldFan
- SEAS -
- SEAS -
Posts: 482
Joined: Tue Nov 26, 2019 19:36 pm
Location: Russia, Surgut

Re: How to set up unit limit

Post by ParaworldFan »

It will be visually seen on map, if doesn’t count army panel?
Post Reply

Return to “English”