Any chance of introducing a command to stop static weapons being dismantled? If there's already a way, please share and I'll close the ticket.
Description
Details
- Legacy ID
- 1544852822
- Severity
- None
- Resolution
- Fixed
- Reproducibility
- N/A
- Category
- Scripting
Event Timeline
All default ingameUI actions should have a flag in their conditions that mission designer can set to disable unwanted actions. It is extremely easy to add. Something along the line of how you can lock doors in houses.
upvoted
enableWeaponDisassembling <bool>;
To disable disassemble action locally for client. Otherwise all static weapons are borderline useless in public servers.
The solutions suggested here are OK if you want to enable/disable the action for everyone based on some generic conditions.
But these solutions are not OK if I want to decide whether weapon disassembly/assembly is decided on the fly when a player/AI tries to disassemble the static weapon or assemble the backpacks (eg: allow/prevent player action depending on the group he belongs to at that specific moment).
A more generic solution would be better (although more complex), since it will allow more fine control over what happens in the mission. And I think the more generic solution is to improve the already existing WeaponDisassembled/WeaponAssembled:
WeaponAssembled => the return boolean determines whether the weapon is assembled or not
WeaponDisassembled => add reference to the weapon object (so I don't need to use cursorTarget workaround which is limited to human player and cannot work with AI soldier)
WeaponDisassembled => the return boolean determines whether the weapon is disassembled or not