A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »How do I script it so when a object take damage it disappears.

Author Topic: How do I script it so when a object take damage it disappears. (4 messages, Page 1 of 1)
Moderators: Dennis

Halocombatevolved
Joined: Nov 20, 2009

Son, I would've been your daddy, but, nevermind.


Posted: Nov 2, 2010 07:19 PM    Msg. 1 of 4       
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?


Muscl3r
Joined: May 22, 2010

dont pray 4 easy lives...pray to be STRONGER MEN


Posted: Nov 2, 2010 07:55 PM    Msg. 2 of 4       
a biped would work. u just need the tag as a biped and not scenery


Halocombatevolved
Joined: Nov 20, 2009

Son, I would've been your daddy, but, nevermind.


Posted: Nov 2, 2010 08:00 PM    Msg. 3 of 4       
Do you mean have a blank biped tag but the scenery's model and collision?

Edit: Yeah I did that but it says: OUT OF OBJECTS: cannot create wall.
Edited by Halocombatevolved on Nov 2, 2010 at 08:04 PM


Sinow
Joined: Apr 22, 2009

Everybody Lies


Posted: Nov 2, 2010 10:34 PM    Msg. 4 of 4       
It says its not a unit cause you are referencing an object, and even so, I do not believe scenery has life. In the case you want to try, use (unit_get_health (unit des1)). Or, set the collision model to have health, and when it reaches 0 have the effect to be an explosion.

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 4:48 PM 125 ms.
A Halo Maps Website