Skip to content

Add listenable setDamage event when Attribute set - #809

Open
Alien314 wants to merge 3 commits into
zen-mod:masterfrom
Alien314:patch-1
Open

Alien314 wants to merge 3 commits into
zen-mod:masterfrom
Alien314:patch-1

Conversation

@Alien314

@Alien314 Alien314 commented May 23, 2026 •

Copy link
Copy Markdown
Contributor

When merged this pull request will:

  • Adds a setDamage event for mod/mission script compatibility to attributes/initAttributes.inc.sqf and context_actions fnc_repairVehicles.sqf

Adds a setDamage event for mod/mission script compatibility.
@Alien314 Alien314 changed the title Add listenable setDamage event Add listenable setDamage event when Attribute set May 23, 2026
@mharis001

Copy link
Copy Markdown
Member

setDamage is GA/GE. A local event probably makes the most sense (consumers can rebroadcast if needed). Also, the naming of this should be considered - should this be namespaced under common?

@Alien314

Alien314 commented May 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Nearly every other event uses common, so I thought it was simplest since setDamage isn't necessarily an attribute specific thing. Edit: added event to context_actions fnc_repairVehicles as well.

@mharis001 mharis001 added the feature Adds a new feature label Sep 12, 2026

{
_x setDamage 0;
[QEGVAR(common,setDamage), [_x, _damage], _x] call CBA_fnc_targetEvent;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

_damage is undefined here.

@mharis001

Copy link
Copy Markdown
Member

The common events are generally meant to be internal use only.

In either case, what is the intended use case for this? If we do implement this, then there are a lot more places where setDamage is called and we would want to consider those as well.

@Alien314

Copy link
Copy Markdown
Contributor Author

Mainly for resetting flags or effects related to the damage state of vehicles.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants