Welcome to the Iron Front Fan Forums!
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Tayuk

Avatar / Picture

Retired Admin/IFR
Registered:
Posts: 456
Reply with quote  #1 
You can try such crude method:

Add following to the init field of the empty tank set in editor:
this addEventhandler ["HandleDamage",{diag_log (_this select 1)}]


Then put yourself as a gunner of another tank, and fire at empty tank once, eg with HE ammo.

In RPT file (can be opened with Notepad, this is log file, where bug warnings and other info is listed) should be now listed all hit parts of the model (some can be repeated several times). For Koenig Tiger such list was returned after front hit:
""
"?"
"engine"
"ltrack"
"rtrack"
"hit_front_hull"
"hit_left_hull"
"hit_right_hull"
"hit_top_hull"
"hit_bottom_hull"
"hit_back_hull"
"mainheadlight"
"turret"
"gun"
"?"
"hit_gun"
"hit_front_turret"
"hit_left_turret"
"hit_right_turret"
"hit_top_turret"
"?"
"hit_back_turret"


Empty quote is for "overall damage" selection, I think. This can be done for any unit or vehicle.

Path to the RPT: C:\Users\(Rydygier)\AppData\Local\Ironfront\ironfr ont.RPT

So for damaging left track use in init field:
this setHit ["ltrack",1];


(or lesser value for partial damage)
0
Tayuk

Avatar / Picture

Retired Admin/IFR
Registered:
Posts: 456
Reply with quote  #2 
Quote:
To hide a track (in addition of damaging it - per Rydygier's instructions), try:
this animate ["ltrack_hide", 1];
(or rtrack_hide for the right side track).

I've got a script (included in all PlannedAssault generated missions) that randomly removes a few (non-critical) skirts and panels from the tank, to make the tanks show wear and tear. But that's not what you are asking for.

William
0
Tayuk

Avatar / Picture

Retired Admin/IFR
Registered:
Posts: 456
Reply with quote  #3 
_william, the above method works great, but how would you go about reversing the animation say after you repair the tank? as a repair truck would repair the damage caused by the hit command, but won't reverse the no track animation.

I know that changing the 1 in the command to 0 shows the track again, but would you have to have some code to check that the vehicle is no longer damaged before changing the animation back to normal?
0
Tayuk

Avatar / Picture

Retired Admin/IFR
Registered:
Posts: 456
Reply with quote  #4 
Rydygier -
Quote:
Lack of "getHit" command for checking current part's damage is known and irritating. There is possible some workaround based on setVariable/getVariable and "HandleDamage" event handler, but not always usable:

getHit workaround
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.