Raised This Month: $ Target: $400
 0% 

About SOLID_TRIGGER


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 11-29-2009 , 05:59   About SOLID_TRIGGER
Reply With Quote #1

When I'm creating entity with SOLID_TRIGGER and trying to kill it by aim, it won't be killed, why it happens? Maybe there are way to ignore that the entity is SOLID_TRIGGER?

P.S. I won't to use SOLID_BBOX, becouse entity will stuck in player origin and I won't to set for example XYZ + ~30 ,becouse it will piss coordinates.

PHP Code:
public Create_Items_Propane_Throw(id)
{
    
emit_sound(idCHAN_ITEMg_medkit_pickup1.0ATTN_NORM0PITCH_NORM);
    
    new 
FloatfOrigin[3], Float:fAngle[3],FloatfVelocity[3];

    
entity_get_vectoridEV_VEC_originfOrigin);
    
entity_get_vectoridEV_VEC_view_ofsfAngle);

    
fOrigin[0] += fAngle[0];
    
fOrigin[1] += fAngle[1];
    
fOrigin[2] += fAngle[2];
    
    
fm_velocity_by_aim(id0.6fVelocityfAngle);
    
fAngle[0] *= -1.0;
    
    new 
item_ent create_entity("info_target");

    
entity_set_stringitem_entEV_SZ_classname"PropItem");
    
    
entity_set_modelitem_entg_w_medic_propane);
    
    
entity_set_size(item_entFloat:{-3.5, -5.5, -8.5}, Float:{3.55.58.5})
    
    
entity_set_floatitem_entEV_FL_takedamage1.0);
    
entity_set_floatitem_entEV_FL_health20.0);
    
    
entity_set_vectoritem_entEV_VEC_originfOrigin);

    
fOrigin[0] += fVelocity[0];
    
fOrigin[1] += fVelocity[1];
    
fOrigin[2] += fVelocity[2];
    
    
entity_set_intitem_entEV_INT_solidSOLID_TRIGGER)
    
entity_set_intitem_entEV_INT_movetypeMOVETYPE_TOSS)
    
    
entity_set_floatitem_entEV_FL_gravity0.55);
    
    
fVelocity[0] *= 1000.0;
    
fVelocity[1] *= 1000.0;
    
fVelocity[2] *= 1000.0;

    
entity_set_vectoritem_entEV_VEC_velocityfVelocity);
    
entity_set_vectoritem_entEV_VEC_anglesfAngle);

__________________
xbatista is offline
Send a message via Skype™ to xbatista
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-29-2009 , 06:07   Re: About SOLID_TRIGGER
Reply With Quote #2

Try to use SOLID_BBOX and set the owner EV_INT_owner ; it should not block. If it still blocks ( it should not ahppen ) try to spawn the entity some units in front of player before.
__________________
Arkshine is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 11-29-2009 , 06:23   Re: About SOLID_TRIGGER
Reply With Quote #3

Interesting , I set it to SOLID_BBOX with owner, but the solid in game is not the SOLID_BBOX, its TRIGGER :/
PHP Code:
public Create_Items_Propane_Throw(id)
{
    new 
FloatfOrigin[3], Float:fAngle[3],FloatfVelocity[3];

    
entity_get_vectoridEV_VEC_originfOrigin);
    
entity_get_vectoridEV_VEC_view_ofsfAngle);

    
fOrigin[0] += fAngle[0];
    
fOrigin[1] += fAngle[1];
    
fOrigin[2] += fAngle[2];
    
    
fm_velocity_by_aim(id0.6fVelocityfAngle);
    
fAngle[0] *= -1.0;
    
    new 
item_ent create_entity("info_target");

    
entity_set_stringitem_entEV_SZ_classname"PropItem");
    
    
entity_set_modelitem_entg_w_medic_propane);
    
    
entity_set_floatitem_entEV_FL_takedamage1.0);
    
entity_set_floatitem_entEV_FL_health20.0);
    
    
entity_set_vectoritem_entEV_VEC_originfOrigin);

    
fOrigin[0] += fVelocity[0];
    
fOrigin[1] += fVelocity[1];
    
fOrigin[2] += fVelocity[2];
    
    
entity_set_intitem_entEV_INT_solidSOLID_BBOX)
    
entity_set_intitem_entEV_INT_movetypeMOVETYPE_TOSS)
    
    
entity_set_floatitem_entEV_FL_gravity0.55);
    
    
fVelocity[0] *= 1000.0;
    
fVelocity[1] *= 1000.0;
    
fVelocity[2] *= 1000.0;

    
entity_set_vectoritem_entEV_VEC_velocityfVelocity);
    
entity_set_vectoritem_entEV_VEC_anglesfAngle);
    
    
entity_set_edictitem_entEV_ENT_ownerid);
    
entity_set_size(item_entFloat:{-3.5, -5.5, -8.5}, Float:{3.55.58.5})
    
    
set_task(0.5"Set_Back_Model"id);

__________________
xbatista is offline
Send a message via Skype™ to xbatista
Dr.G
Senior Member
Join Date: Nov 2008
Old 11-29-2009 , 06:31   Re: About SOLID_TRIGGER
Reply With Quote #4

Ive tryed something like that as well. Never worked for me. The only way i got it to work, was by getting the classname that i aim at, check the button, and if positive, call a function that handles the kill of the entity.
__________________
Dr.G is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 11-29-2009 , 06:35   Re: About SOLID_TRIGGER
Reply With Quote #5

Quote:
Originally Posted by Dr.G View Post
Ive tryed something like that as well. Never worked for me. The only way i got it to work, was by getting the classname that i aim at, check the button, and if positive, call a function that handles the kill of the entity.
Tryied ://
With SOLID_TRIGGER don't work, also SOLID_BBOX + owner = SOLID_TRIGGER lol
how to solve?
__________________
xbatista is offline
Send a message via Skype™ to xbatista
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-29-2009 , 06:40   Re: About SOLID_TRIGGER
Reply With Quote #6

Quote:
SOLID_BBOX + owner = SOLID_TRIGGER
Check again what you are doing. Just because you provide an owner it won't change the movetype by magic.
__________________
Arkshine is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 11-29-2009 , 06:51   Re: About SOLID_TRIGGER
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
Check again what you are doing. Just because you provide an owner it won't change the movetype by magic.
Whats wrong? :/ I don't understand
__________________
xbatista is offline
Send a message via Skype™ to xbatista
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-29-2009 , 07:20   Re: About SOLID_TRIGGER
Reply With Quote #8

Me too. I don't understand why you say "SOLID_BBOX + owner = SOLID_TRIGGER". By manipulating such dummy entity with pev_owner I had never been problems.
__________________
Arkshine is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 11-29-2009 , 07:33   Re: About SOLID_TRIGGER
Reply With Quote #9

when is owner set and is SOLID_BBOX I can't remove entity by aim
__________________
xbatista is offline
Send a message via Skype™ to xbatista
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-29-2009 , 07:35   Re: About SOLID_TRIGGER
Reply With Quote #10

Not sure to understand... But if really it doesn't work like you want, you can hook the touch and disabled it for you to avoid the blocking ; or spawning the entity in front of you. Because right now you use your own origin to set the start origin.
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

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 13:39.


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