Ace3: ACE_Explosives_fnc_scriptedExplosive

Created on 24 Mar 2016  路  6Comments  路  Source: acemod/ACE3

Arma 3 Version: x.xx (stable / rc / dev)
CBA Version: 2.x.x (stable / dev + commit hash)
ACE3 Version: 3.x.x (stable / dev + commit hash)

Mods:

  • CBA_A3
  • ACE
  • RHS
  • UOMODS
  • UOMAPS
  • UOMAPSCUP
  • ACRE

Description:

  • when using "call ACE_Explosives_fnc_scriptedExplosive;" as described on the aCE3wiki the function gives an error(Error Undefined variable in expression: _dettime) line 6.

full script code:
"_ied = _this select 0;

        waitUntil {
                sleep 0.5;
                {((_x distance _ied < 10)) and (side _x == west) } count allUnits > 0;
            };
            [[_ied],1] call ACE_Explosives_fnc_scriptedExplosive;

"

Steps to reproduce:

  • place "ACE_IEDUrbanBig_Range"
  • the placed ied has "null = [this] execVM "scripts\ied.sqf";" in the init field.
  • uses above script code in ied.sqf
  • approach ied till triggered

Where did the issue occur?

  • Editor (Singleplayer)

Placed Modules:

  • none

RPT log file:

kinbug

Most helpful comment

@esteldunedain I think @C0RAX is referring to this wiki page:
http://ace3mod.com/wiki/missionmaker/useful-functions.html

Yeah, it should be documented there or a better example should be used there.

All 6 comments

The function is meant to be executed in unscheduled environment.

Try replacing:
[[_ied],1] call ACE_Explosives_fnc_scriptedExplosive;
with:
[ACE_Explosives_fnc_scriptedExplosive, [[_ied],1]] call CBA_fnc_directCall;

Works great, thank you for the prompt response.

would ask for this to be added and documented in the wiki as it's not immediately clear that it wont work in a scheduled environment.

@C0RAX, scheduled environment is plain unreliable because, depending on the load your mission is having, the executed code may be interrupted at any moment. That's why ACE runs 95% of it's code in non-scheduled environment.

Best practice would be to always call ACE API on non-sched (and the same for ACRE, TFAR, etc). You are right we should document that.

@esteldunedain I think @C0RAX is referring to this wiki page:
http://ace3mod.com/wiki/missionmaker/useful-functions.html

Yeah, it should be documented there or a better example should be used there.

Reopening for #3633

fixed in #3633

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Snak3Doc picture Snak3Doc  路  4Comments

thirald picture thirald  路  3Comments

pognivet picture pognivet  路  3Comments

ItayNoyman picture ItayNoyman  路  3Comments

SimichRE picture SimichRE  路  3Comments