I have a func_explosive with a health of 150, but I’d like to have the flexibility to make it a dyno-only destructible if desired. Can you set the health value in the .script in the same way the constructible class is set in the .script?
Can health for func_explosive be set in the .SCRIPT file?
The only thing I’ve found is:
constructible_health <int:health>
But I think it can only be used with constructibles.
Actually you might want to try that setting with your func_explosive. If I remember correctly, I saw someone use it that way before.
hmmmm
Would I have to delete the key-pair in the entity or would the script override that?
I’ll try health = 0 in my script
Wow, after a quick glance at the code, it appears that all of the constructible stats work on func_explosives.
As for the health, I think whatever you set the func_explosive’s health to in the map will be overwritten by the script.
EDIT: However, if you want the func_explosive to take damage do NOT set the health to zero in the map.
Hmmm, it appears that it can take all values > 0. You will error out if you set construcible_health = 0
Soooooo close
Why don’t you just setup two func_explosives and disable and/or remove the one you don’t want when the event comes time to be triggered?
yeah, I could do that too. Just thought there would be an easier way to do it. <---- lazy
What about using:
setdamagable <targetname> <0|1>
Theoretically, it should work.
nope, that didn’t work. The funny thing, is if I assign a constructible_class value to my func_explosive in my script, I get some odd results, like it requires 2 grenades or the grenades have to be placed exactly right.
if the constructible_health doesnt work a func_destructible, i guess you could always make a func_constructible over the func_destructible. Make the func_constructible out of clips, give health 0 to the func_destructible, and in the death of the func_constructible you do an “alertentity” (or is it kill?) of your func_destructible! That way you get the debris, the noise, and even a cm icon if you want!