How do I script it so when a object take damage it disappears. Like I shoot at a tree with a rocket launcher then it places an explosion and destroys the tree. I've tried this:
(unit_get_health des1) 0.1))
(unit_get_health des1) 0))
(object_destroy des1)
(effect_new effects\explosions\medium explosion de1)
(de1 is the flag and des1 is object)
but I get this:
[start line 79] this is not an object of type unit_name.: des1) 0.1))
recompiling scripts after scenarios were merged.
this is not an object of type unit_name.: des1) 0.1))
It is an scenery tag... but I dont know if scenery's work with this. What does work?