OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: schuler on 30 Jun 2008, 19:37:21

Title: [solved]setdammage to obj (473384) after empty vehicle destroyed
Post by: schuler on 30 Jun 2008, 19:37:21
Hello my good fellows,
Is there a way to get an object like a building (346577) to setdammage -1 and blow up, after an empty vehicle is destroyed?
What I have is an empty truck in a shed and I want the building to be destroyed after the truck is destroyed.
Cheers schuler
Title: Re: setdammage to obj (473384) after empty vehicle destroyed
Post by: Spooner on 30 Jun 2008, 19:58:01
Should do you:
Code: (init line of truck) [Select]
this addEventHandler ["KILLED", { ((getPos (_this select 0)) nearestObject 346577) setDamage 1 } ];
Title: Re: setdammage to obj (473384) after empty vehicle destroyed
Post by: schuler on 30 Jun 2008, 20:23:50
sure did  :D  ;)
thanks schuler