Making entities damage breakable objects
How do I make an entity be able to damage/destroy a breakable object?
i.e. glass |
It matters what you want to do, the simpliest thing to do is just to use fakedamage() on the entity you want to destroy. If you want to specify between which ent you want to do the damage and which want you want to take the damage you need to be a bit more specific. Once you know which ents what to do this action you'll have to use a combination of fake_touch(), which will stimulate the 2 ents touchin each other, then pfn_touch(), which is a function that will be called when the 2 ents touch each other, then that happens your going to want to use the fake_damage() to apply the damage to the ent you want destroyed which in your case would be the glass.
How to specify which ents are glass is a completely different and harder process though. |
actually its easy. You can do it by classname
|
Or you can do that, I was thinkin more about DispatchKeyValue() for some reason :?
|
Actually I tried by classname. Didn't work. I found any enities with class name "func_breakable" and set damage to it with fakedamage, but didn't work
|
You should post your plugin, if you did it correctly it should work.
|
Not nessasarily. fake damage isnt exactly the best way to go.
|
Alrighty then, instead of just sayin that and leavin it there why don't you give an example of a better way of doin it?
|
| All times are GMT -4. The time now is 19:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.