Hello
I was in the process of finishing my C4, when I realized what I have done so far is extremely over powered for anyone. Bases go down in, well, 1 Cr. I was trying to find a way to make it so this C4 that I created (which will unfreeze and unweld props on explosion) will actually not destroy props in 1 C4, but multiple depending on the prop weight that I have seen before. I tried to use an addon from the work shop, but that will work with any explosive, and my C4 already unwelds and unfreezes peops so there really is no way to benefit from it (that I see)
any help would be appreciated.
Just add your own variable, instead of unfreezing and unwelding, it will check its health, if 0 or less, run the code you already have, and if health is more than 0, subtract some health from it.
Ok, So I found Entity/SetHealth online, and I was curious on what I would even need to do in order to get it so that my explosion even dealt damage in the first place, so now that I can set the health for it, I just need to know how to take it away.
Thank you!
try hooking into GM/EntityTakeDamage
Use Entity/SetHealth to set the current health of an item, that is how you make it take damage.
Use SetMaxHealth to define its max value.
Use Entity/Health to check its current health.
To make it reduce by lets say 25% you'd just do simple math on it, make it set health to current health minus the damage you want.
Sorry, you need to Log In to post a reply to this thread.