mirror of
https://github.com/acemod/ACE3.git
synced 2025-07-25 04:42:48 +00:00
Arsenal Actions - Add support for multiline text & updating on cargo event (#9771)
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
@ -402,6 +402,8 @@ For actions involving frame delays or timers, a second call of the `ace_arsenal_
|
||||
|
||||
Since CBA frame functions are deactivated during preInit as of Oct 24th 2023, the refresh function is executed immediatelly after the action code is executed. Take note of this information and the comment below if you'd like your actions to be usable in 3DEN.
|
||||
|
||||
By default actions are updated whenever the arsenal is refreshed (`ace_arsenal_fnc_refresh`) and whenever item info (the bottom right GUI element that shows item name and author) is updated. If any action with the `updateOnCargoChanged` property is added, then actions will also be updated on container inventory changes.
|
||||
|
||||
### 7.1 Adding actions via config
|
||||
|
||||
```cpp
|
||||
@ -410,6 +412,7 @@ class ace_arsenal_actions {
|
||||
displayName = "My Actions";
|
||||
condition = QUOTE(true);
|
||||
scopeEditor = 2; // Only actions with scopeEditor = 2 are shown in 3DEN. Actions working with variables should take object variables being reset between editor view and mission start into account.
|
||||
updateOnCargoChanged = 1; // See comment above.
|
||||
tabs[] = {0,5};
|
||||
class text {
|
||||
// A simple text label
|
||||
@ -417,6 +420,7 @@ class ace_arsenal_actions {
|
||||
};
|
||||
class statement {
|
||||
// Statement output as text
|
||||
// Return can be string or array of strings: for array each entry is automatically displayed on a separate line
|
||||
textStatement = QUOTE([_this select 0] call tag_fnc_myTextStatement);
|
||||
};
|
||||
class button {
|
||||
@ -441,6 +445,7 @@ The focused unit object is passed to the condition and statement functions.
|
||||
3 | Actions | Array of arrays | Required
|
||||
4 | Condition | Code | Optional (default: `{true}`)
|
||||
5 | Scope editor | Number | Optional (default: `2`)
|
||||
6 | Update on cargo change | Boolean | Optional (default: `false`)
|
||||
|
||||
Return Value:
|
||||
- Array of action IDs
|
||||
|
Reference in New Issue
Block a user