Skip to content

Explosives - Add ability to attach explosives to objects#11307

Open
DartRuffian wants to merge 10 commits intoacemod:masterfrom
DartRuffian:explosives/object-attach
Open

Explosives - Add ability to attach explosives to objects#11307
DartRuffian wants to merge 10 commits intoacemod:masterfrom
DartRuffian:explosives/object-attach

Conversation

@DartRuffian
Copy link
Contributor

@DartRuffian DartRuffian commented Mar 8, 2026

When merged this pull request will:

  • Add a config flag to allow explosives to be placed on any non-unit object (e.g. houses)
    • M112 and the M183 can be attached to objects (vibes based, maybe not the M183 though)
    • This does have issues where units can place/attach explosives inside thin walls (like doors), but this also happens with vehicles anyway
  • Add common function to check if something is a terrain object

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

Copy link
Member

@LinkIsGrim LinkIsGrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SLAMs, demo black might good for object attachable as well

@LinkIsGrim LinkIsGrim added the kind/feature Release Notes: **ADDED:** label Mar 8, 2026
@LinkIsGrim LinkIsGrim added this to the 3.21.0 milestone Mar 8, 2026
@DartRuffian
Copy link
Contributor Author

I was gonna do the SLAM but it's rotated 90 degrees so I just left it off

@DartRuffian
Copy link
Contributor Author

DartRuffian commented Mar 10, 2026

Found an issue while doing some more testing, seems like trying to attach them to terrain objects causes them to be sent to the debug corner Resolved by using a dummy object when attaching to terrain objects

2026-03-10.11-52-50.mp4

@DartRuffian
Copy link
Contributor Author

DartRuffian commented Mar 10, 2026

Needs docs, but that's easy. Can do that after property name is picked Done

@DartRuffian
Copy link
Contributor Author

Name was changed to make it clearer, I'm happy with it now

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason not to use https://cbateam.github.io/CBA_A3/docs/files/common/fnc_isTerrainObject-sqf.html instead? I'd prefer to not add a public function if we can avoid it.

Copy link
Contributor Author

@DartRuffian DartRuffian Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know it existed, and seemed like common enough utility to just make it a public function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checked the CBA one, it's doing a nearestTerrainObjects so its decently slower than just checking net id:

player call CBA_fnc_isTerrainObject; // Execution Time: 0.0041 ms  |  Cycles: 10000/10000  |  Total Time: 41 ms
player call ace_common_fnc_isTerrainObject; // Execution Time: 0.0037 ms  |  Cycles: 10000/10000  |  Total Time: 37 ms

I'll swap it to the CBA one, and PR changing the CBA one to check net id

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DartRuffian and others added 4 commits March 19, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Release Notes: **ADDED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants