Bug #25482

Kronzky target range broken in 1.60 - (Killed) EH (init) problems?

Added by kju almost 4 years ago. Updated over 3 years ago.

Status:Closed Start date:10/14/2011
Priority:Normal Due date:
Assignee:Suma % Done:

0%

Category:Scripting: Problem
Target version:1.60.87580
Affected ArmA II version:1.60 BETA First affected build:
Reproduced by another DH user:No First affected ArmA II version:1.60 BETA
I am using some Mods:No Single / Multi Player?:
I am using: BIForumURL:
Reproducible for you:Yes NGUrl:
Related to content of DLC: WIKIurl:

Description

Obs
Units no longer spawns after killed for the second time.

Exp
Should keep working as in 1.59

Repro
  1. Editor
  2. Start
  3. Killed TK guy
  4. Watch him respawn (body removal and new put)
  5. Notice he no longer faces you (in 1.59 he does)
  6. Kill him again
  7. Notice he no longer respawns (no body removal, no new guy)

Could be similar/same as #25458.

TargetRange.Desert_E.7z (9.7 kB) kju, 10/14/2011 19:20


Related issues

related to ARMA2 Community Issue Tracker - Bug #25458: Scripting issues with OA campaign 07 Eye of the Typhoon m... Closed 10/14/2011

History

Updated by kju almost 4 years ago

You find the EH code in functions.sqf.
It is rather crudely done..

 1 // create a target object
 2 KRON_maketarget =
 3 {
 4     private["_idx","_pos","_unit","_trgname"];
 5     _idx=_this select 0;
 6     _pos=[KRON_orgPos, KRON_orgDir, [_idx,KRON_space] call KRON_xOff, KRON_dist] call KRON_rotpoint;
 7     _unit=0;
 8     KRON_Cnt=KRON_Cnt+1;
 9     if (((KRON_targetType select _idx) select 0) isKindOf "Man") then
10     {
11         call compile format["""%1"" createUnit [_pos, KRON_grp,""KRON_U_%2 = this"", 0.1, ""private""]",(KRON_targetType select _idx) select 0,KRON_Cnt];
12         call compile format["_unit=KRON_U_%1",KRON_Cnt];
13         _unit setPos [_pos select 0, _pos select 1, .5];
14         {_unit removeMagazine _x} forEach magazines _unit;
15         _unit setBehaviour "careless";
16         _unit allowFleeing 0;
17         _unit disableAI "MOVE";
18         _unit disableAI "TARGET";
19         _unit doWatch player;
20         _unit setUnitPos (KRON_unitpos select _idx);
21     }
22     else
23     {
24         if (isClass(configFile/"cfgVehicles"/((KRON_targetType select _idx) select 0))) then
25         {
26             _unit = [(KRON_targetType select _idx) select 0,_pos,(KRON_targetType select _idx) select 1] call KRON_makeobj;
27             _unit setVehicleVarName format["KRON_U_%1",KRON_Cnt];
28             _unit call compile format["KRON_U_%1=_unit",KRON_Cnt];
29         };
30     };
31     if (typeName _unit=="OBJECT") then
32     {
33         _unit setDir ([KRON_orgDir,(KRON_targetType select _idx) select 1] call KRON_addangle);
34         KRON_targets set [_idx,_unit];
35         _unit addEventHandler["hit","KRON_HQ globalchat format['""%1"" hit, damage:%2',getText(configFile/'cfgVehicles'/typeof (_this select 0)/'displayName'),floor((_this select 2)*100)/100]; "];
36         call compile format["_unit addEventHandler[""killed"",""setAccTime .99; KRON_HQ globalchat '""""%2"""" killed'; deleteVehicle (_this select 0)""]",_idx,getText(configFile/"cfgVehicles"/typeOf _unit/"displayName")];
37         _trgname=format["KRON_Trig_%1",KRON_Cnt];
38         call compile format["%1=createTrigger[""EmptyDetector"",[0,0]]",_trgname];
39         call compile format["%1 setTriggerArea[0,0,0,true]",_trgname];
40         call compile format["%1 setTriggerActivation[""NONE"",""PRESENT"",false]",_trgname];
41         call compile format["%1 setTriggerTimeout[3,3,3,false]",_trgname];
42         call compile format["%1 setTriggerStatements[""!(alive KRON_U_%3)"", ""[%2] call KRON_maketarget; setAccTime KRON_SlowMo; deleteVehicle KRON_Trig_%3"", """"]",_trgname,_idx,KRON_Cnt];
43     };
44     _unit;
45 };

Updated by Suma almost 4 years ago

  • Status changed from New to Assigned

It seems like the cause is the same as in 25458 - the init requested in createUnit is executed too late.

Updated by kju almost 4 years ago

  • Due date deleted (11/01/2011)
  • Status changed from Assigned to Closed
  • Target version set to 1.60 BETA

works again. ty

Updated by kju over 3 years ago

  • Target version changed from 1.60 BETA to 1.60.87580

Also available in: Atom PDF