Raised This Month: $ Target: $400
 0% 

Player doesn't touch a SOLID_TRIGGER entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bLacK-bLooD
AlliedModders Donor
Join Date: Jun 2008
Old 01-14-2020 , 14:56   Player doesn't touch a SOLID_TRIGGER entity
Reply With Quote #1

Hi, I have an entity (a sprite) and it is setup like this:


PHP Code:
new iEntity create_entity("func_button");
entity_set_int(iEntityEV_INT_solidSOLID_TRIGGER);
entity_set_int(iEntityEV_INT_movetypeMOVETYPE_NONE);
entity_set_model(iEntityg_szTimerSprites[iType]);
entity_set_size(iEntityFloat:{-16.0, -128.00.0}, Float:{16.0128.0128.0}); 
When I try to hook a touch, however, the player never seems to touch the entity. The code for it is:

PHP Code:
register_touch("player","*","hook_touch");
public 
hook_touch(playerentity) {
    new 
classname[32];

    
entity_get_string(entityEV_SZ_classnameclassname31);

    
console_print(player"Class name touched: %s"classname);

I never get my entity touch, even though I walk through it. If I change the EV_INT_solid to SOLID_BBOX, it works just fine.

Any ideas why this is happening?

Thank you!
__________________
We all live under the same sky but we have different horizons.

Last edited by bLacK-bLooD; 01-14-2020 at 15:46.
bLacK-bLooD is offline
 


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 02:50.


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