Search the Community
Showing results for tags 'hitpart'.
Found 2 results
-
Using HitPart On Land_CarService_F Problem
beno_83au posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I've come across a problem where using the EH "HitPart" on the "Land_CarService_F" building doesn't return a selection when it's doors are hit, it only returns "Any". As a quick reference, here's the building: Other buildings return the selection (door name) just fine when hit, but this one won't. To reproduce just plug this into the console when looking at the servo: cursorObject addEventHandler ["HitPart",{ ((_this select 0) select 0) params ["_building"]; ((_this select 0) select 5) params ["_door"]; systemChat format["%1 |-| %2",_building,_door]; }]; Have I missed something? Or is this one for the feedback tracker? Thanks Edit: Posted to the Feedback tracker. -
Welcome, To keep this short : _hit = 0 I want this variable to increase everytime the object _Str been hit. _Str addEventHandler ["HitPart",{_hit = _hit + 1}]; This doesn't work because the EH doesn't know the localvariable. _Str addEventHandler ["HitPart",{hit = hit + 1}]; This does work because it is a globalvariable. But i need it to be a localvariable, because there are 200 objects that are being spawned using the same variable. waitUntil {_Hit > 3}; deletevehicle _Str; I want the obj to delete itself after being hit 3 times. Is there workaround that i can use? Or maby a different way to approach this? Draoth
- 2 replies
-
- difficult
- eventhandler
-
(and 5 more)
Tagged with: