Login

russian armor

limit a squad's builds

9 May 2023, 09:17 AM
#1
avatar of trigg

Posts: 139

To prevent spam, I want to limit the number of instances of a certain thing that a squad can build. (For example, the number of traps.)

If I want to limit it to, say, four instances per squad, I could make a repeatable upgrade or slot item to control it, grant the squad four when it is created, make the construction depend on the squad having it, and then consume one for each build.

I think it would be easy if implemented as an ability, but due to limited menu space I need to make it a construction task. However, I haven't been able to figure out how make the squad use one for construction.

It seems like in_construction_actions should work, but the squad can build other things and I haven't been able to make in_construction_actions depend on what is being built.

Any ideas?
9 May 2023, 15:45 PM
#2
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

The biggest problem with construction items is that they cannot check upgrades or slot items of the engineer. Only global upgrades can be validated.

I think the best solution is to use a global limit per defense with required_cap in ebps/requirements.
12 May 2023, 06:34 AM
#3
avatar of trigg

Posts: 139

The biggest problem with construction items is that they cannot check upgrades or slot items of the engineer. Only global upgrades can be validated.

I think the best solution is to use a global limit per defense with required_cap in ebps/requirements.

Thanks, SneakEye
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

284 users are online: 284 guests
2 posts in the last 24h
9 posts in the last week
33 posts in the last month
Registered members: 50147
Welcome our newest member, hayaldv27
Most online: 2043 users on 29 Oct 2023, 01:04 AM