Raised This Month: $ Target: $400
 0% 

Entity makes player stuck


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DavidLin
Member
Join Date: Jan 2016
Old 01-30-2016 , 14:24   Entity makes player stuck
Reply With Quote #1

When a player throws entity at a player which can't have it the player gets stuck or when entity is thrown to ground the entity floats down below ground. What could cause this problem ?

PHP Code:
public throwentid ) {
        new 
Float:Origin], Float:Velocity], Float:Angles], Float:FAngles];
        
entity_get_vectoridEV_VEC_originOrigin );
        
velocity_by_aimid64Angles )
        
vector_to_angleAnglesFAngles );

        
FAngles] = 0.0;
        
Origin] += Angles];
        
Origin] += Angles];
        
Origin] += Angles];

        new 
entity_ent create_entity"info_target" );
        
entity_set_stringentity_entEV_SZ_classnameentity_name );
        
entity_set_vectorentity_entEV_VEC_anglesFAngles );
        
entity_set_intentity_entEV_INT_solidSOLID_BBOX );
        
entity_set_intentity_entEV_INT_movetypeMOVETYPE_TOSS );
        
entity_set_originentity_entOrigin );
        
entity_set_modelentity_entgModel );
        
entity_set_sizeentity_entminModelmaxModel );
        
set_peventity_entpev_iuser2id );

        
entity_set_intentity_entEV_INT_renderfxkRenderFxGlowShell );
        
entity_set_vectorentity_entEV_VEC_rendercolorFloat:{ 221.0173.0237.0 } );

        
velocity_by_aimid300Velocity );
        
entity_set_vectorentity_entEV_VEC_velocityVelocity );
        
entity_set_floatentity_entEV_FL_takedamageDAMAGE_YES );
        
entity_set_floatentity_entEV_FL_gravity0.8 );
        
entity_set_floatentity_entEV_FL_healthget_pcvar_floatent_health ) );
        
has_entid ] = false;


Last edited by DavidLin; 01-30-2016 at 14:24.
DavidLin is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 01-31-2016 , 02:35   Re: Entity makes player stuck
Reply With Quote #2

Have you tried func_breakable ?
siriusmd99 is offline
DavidLin
Member
Join Date: Jan 2016
Old 01-31-2016 , 06:25   Re: Entity makes player stuck
Reply With Quote #3

I don't need it for the entity to brake when it is dropped just when it takes right amount of damage.
If the entity is thrown further from player then it bounces back but if the entity is thrown when the players are right next to each other the entity gets stuck in the player, same happens when I try to throw it to a wall but it just goes through the wall.

FIXED. Just added a task to remove owner of the enitity.

Last edited by DavidLin; 01-31-2016 at 09:10.
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:34.


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