mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Update coding-guidelines.md (#6303)
* Update coding-guidelines.md * Update coding-guidelines.md
This commit is contained in:
parent
87c3a7a334
commit
7b6b1eadcd
@ -780,17 +780,14 @@ while {true} do {
|
||||
```
|
||||
|
||||
### 8.9 `waitUntil`
|
||||
The `waitUntil` command shall not be used. Instead, make use of a per-frame handler:
|
||||
|
||||
The `waitUntil` command shall not be used. Instead, make use of CBA's `CBA_fnc_waitUntilAndExecute`
|
||||
```js
|
||||
[{
|
||||
params ["_args", "_id"];
|
||||
_args params ["_unit"];
|
||||
|
||||
if (_unit getvariable [QGVAR(myVariable), false]) exitwith {
|
||||
[_id] call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
// Execute any code
|
||||
};
|
||||
}, [_unit], 0] call CBA_fnc_addPerFrameHandler;
|
||||
params ["_unit"];
|
||||
_unit getVariable [QGVAR(myVariable), false]
|
||||
},
|
||||
{
|
||||
params ["_unit"];
|
||||
// Execute any code
|
||||
}, [_unit]] call CBA_fnc_waitUntilAndExecute;
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user