Summary
DAD'S PREFAB LIMITER
Description
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DAD'S PREFAB LIMITER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
A lightweight server-side component that lets you set a maximum instance count on any buildable prefab. When a player attempts to place an object that has already hit its limit, the placement is cancelled immediately with no refund and a hint message is shown explaining why. Works on both factions with no additional setup.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FEATURES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Set a per-prefab instance limit directly in the Workbench editor
- Placement is blocked the moment the limit is reached — no refund given
- Closest player receives a customisable hint message explaining the block
- Runs entirely server-side — no client mod required
- Works for both factions equally
- No mission scripting required — attach and go
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETUP INSTRUCTIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Open the prefab you want to limit in Workbench.
2. Add the "dads_prefablimiter" component to that prefab.
3. In the component settings, set the following:
- Max Instances
The maximum number of this prefab allowed in the world at once.
Example: set to 2 to allow no more than 2 of this object on the map.
- Limit Message
The hint text shown to the player when their placement is blocked.
Example: "This object has reached its placement limit."
You can customise this per prefab.
4. Save the prefab and load your mission. The limiter is active immediately.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- The limit check runs at the moment of placement. If the limit is already
met when a player places the object, it is deleted instantly and no
supplies are returned.
- The hint message is sent to the player nearest to the placement location,
which in almost all cases will be the player who attempted the placement.
- Setting Max Instances to 0 will disable the limit check entirely for
that prefab.License
Arma Public License (APL)