Raised This Month: $ Target: $400
 0% 

Entity can't be destroyed after throwing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DavidLin
Member
Join Date: Jan 2016
Old 01-14-2016 , 09:49   Entity can't be destroyed after throwing
Reply With Quote #1

I have this code which throws an entity and it can't be killed for some reason. Is it because of movetype and solid maybe ? Also the entity size doesn't work

PHP Code:
public throwstickid ) {
        new 
Float:Origin], Float:Velocity], Float:Angles];
        
entity_get_vectoridEV_VEC_originOrigin );
        
entity_get_vectoridEV_VEC_v_angleAngles );
        
Angles] = 0.0;

        new 
entity_stick create_entity"info_target" );
        
entity_set_stringentity_stickEV_SZ_classnameentity_name );
        
entity_set_vectorentity_stickEV_VEC_anglesAngles );
        
entity_set_intentity_stickEV_INT_solidSOLID_TRIGGER );
        
entity_set_intentity_stickEV_INT_movetypeMOVETYPE_TOSS );
        
entity_set_originentity_stickOrigin );
        
entity_set_modelentity_stickgModel );
        
entity_set_sizeentity_stickminModelmaxModel );
        
entity_set_floatentity_stickEV_FL_takedamage1.0 );
        
entity_set_floatentity_stickEV_FL_healthget_pcvar_floatstick_health ) );
        
entity_set_edictentity_stickEV_ENT_ownerid );

        
entity_set_intentity_stickEV_INT_renderfxkRenderFxGlowShell );
        
entity_set_vectorentity_stickEV_VEC_rendercolorFloat:{ 221.0173.0237.0 } );

        
velocity_by_aimid1200Velocity );
        
entity_set_vectorentity_stickEV_VEC_velocityVelocity );
        
has_stickid ] = false;


Last edited by DavidLin; 01-14-2016 at 09:50.
DavidLin is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 01-14-2016 , 10:05   Re: Entity can't be destroyed after throwing
Reply With Quote #2

Quote:
Originally Posted by DavidLin View Post
I have this code which throws an entity and it can't be killed for some reason. Is it because of movetype and solid maybe ? Also the entity size doesn't work
Sorry if i will be wrong here but i think you shall make entity func_breakable .
siriusmd99 is offline
DavidLin
Member
Join Date: Jan 2016
Old 01-14-2016 , 10:21   Re: Entity can't be destroyed after throwing
Reply With Quote #3

So that wasn't the problem. When entity solid is _BBOX the owner of entity can't collide with it or do damage to it so I just stored the owner id in pev_iuser and it works like a charm

Last edited by DavidLin; 01-14-2016 at 10:22.
DavidLin is offline
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 09:26.


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