Raised This Month: $ Target: $400
 0% 

Making entities damage breakable objects


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 01-23-2005 , 02:21   Making entities damage breakable objects
Reply With Quote #1

How do I make an entity be able to damage/destroy a breakable object?
i.e. glass
KCE is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 01-25-2005 , 12:08  
Reply With Quote #2

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.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-26-2005 , 15:23  
Reply With Quote #3

actually its easy. You can do it by classname
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Votorx
Senior Member
Join Date: Jun 2004
Old 01-26-2005 , 18:50  
Reply With Quote #4

Or you can do that, I was thinkin more about DispatchKeyValue() for some reason
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 01-26-2005 , 19:34  
Reply With Quote #5

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
KCE is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 01-27-2005 , 07:15  
Reply With Quote #6

You should post your plugin, if you did it correctly it should work.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-27-2005 , 12:39  
Reply With Quote #7

Not nessasarily. fake damage isnt exactly the best way to go.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Votorx
Senior Member
Join Date: Jun 2004
Old 01-27-2005 , 13:04  
Reply With Quote #8

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?
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode