View Single Post
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 08-13-2009 , 10:54   Re: Detecting func_breakable destruction. & Create breakable func_pushable.
Reply With Quote #19

Quote:
Originally Posted by xPaw View Post
What you want to do
The question ->

Quote:
Quote:
Originally Posted by KWo View Post
Code:
bool IsShootableBreakable (edict_t *pent)  // KWo - 08.02.2006 {    if (pent == NULL)       return (false);    return ( ( (FStrEq ("func_breakable", STRING (pent->v.classname))            && ( (pent->v.playerclass == 1) || (pent->v.health == 0)                 || ( (pent->v.health > 1) && (pent->v.health < 1000))                 || (pent->v.rendermode == 4) ) // KWo - 21.02.2006 - br. crates has rendermode 4                 || (FStrEq ("func_pushable", STRING (pent->v.classname))                   && (pent->v.spawnflags & SF_PUSH_BREAKABLE))))                && (pent->v.impulse == 0)                && (pent->v.takedamage > 0)                && !(pent->v.spawnflags & SF_BREAK_TRIGGER_ONLY) ); }
Here is the code in C++ from podbot mm to recognize breakable "func_breakable". Another thing is this - in info key values You can also check the material, the breakable is created based on - and there is something like unbreakable glass - which makes the "func_breakable" despite its name as unbreakable. Hope it can help You somehow.
Sorry to bring up an old thread, but I have question, will an entity work like a func_breakable (will be shootable) if the properties that are placed in this return (without the classnames) are assigned to it?
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline