Difference between revisions of "User:VKing/Sandbox"
m |
|||
Line 9: | Line 9: | ||
#include "script_component.hpp" | #include "script_component.hpp" | ||
− | + | PARAMS_1(_unit); | |
− | |||
− | |||
− | |||
− | |||
− | + | private ["_markerData","_markerArray","_killedType","_pos","_dummy"]; | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | _markerData = _unit getVariable QGVAR(markerData); | |
+ | _markerArray = _unit getVariable QGVAR(markerArray); | ||
+ | _killedType = _unit getVariable QGVAR(killedType); | ||
+ | _bft = _unit getVariable QGVAR(markerBFT); | ||
− | + | if (isNil "_markerData") exitWith { | |
− | + | TRACE_1("No markerData for unit",_unit); | |
− | + | if (!isNil "_markerArray") exitWith { | |
− | + | _unit setVariable [QGVAR(markerArray),nil,true]; | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | if (" | ||
− | |||
− | |||
− | |||
− | if (! | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}; | }; | ||
}; | }; | ||
− | + | if (isNil "_markerArray") exitWith { | |
− | + | TRACE_1("No markerArray for unit",_unit); | |
− | + | _unit setVariable [QGVAR(markerData),nil,true]; | |
− | + | }; | |
− | |||
− | |||
− | + | EXPLODE_7(_markerData,_name,_mods,_type,_size,_scale,_visibleTo,_text); | |
− | + | _pos = getPos _unit; | |
− | |||
− | |||
− | |||
− | + | if (isNil "_killedType") then { | |
− | + | _killedType = GVAR(gKilledType); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | if (" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}; | }; | ||
+ | TRACE_2("",_killedType,_bft); | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 16:04, 26 December 2014
{{#invoke:Message box|mbox}}
SQF
<syntaxhighlight lang="sqf"> // #define DEBUG_MODE_FULL
- include "script_component.hpp"
PARAMS_1(_unit);
private ["_markerData","_markerArray","_killedType","_pos","_dummy"];
_markerData = _unit getVariable QGVAR(markerData); _markerArray = _unit getVariable QGVAR(markerArray); _killedType = _unit getVariable QGVAR(killedType); _bft = _unit getVariable QGVAR(markerBFT);
if (isNil "_markerData") exitWith { TRACE_1("No markerData for unit",_unit); if (!isNil "_markerArray") exitWith { _unit setVariable [QGVAR(markerArray),nil,true]; }; }; if (isNil "_markerArray") exitWith { TRACE_1("No markerArray for unit",_unit); _unit setVariable [QGVAR(markerData),nil,true]; };
EXPLODE_7(_markerData,_name,_mods,_type,_size,_scale,_visibleTo,_text); _pos = getPos _unit;
if (isNil "_killedType") then { _killedType = GVAR(gKilledType); }; TRACE_2("",_killedType,_bft); </syntaxhighlight>