AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How would you go about catching an entity touch? (https://forums.alliedmods.net/showthread.php?t=108129)

Styles 11-01-2009 22:58

How would you go about catching an entity touch?
 
Ok, funny situation. Some maps in CS, you can "break" doors by like jumping at then, they have a sound attached to them via the map so you know your interacting in some way.

I need to find a way to negate this, "touch" so you can't affect it.

I have tried

PHP Code:

RegisterHam(Ham_Touch"door1""rhTouchCell")
public 
rhTouchCell(iEntiPlayer)
{
    if( 
IsPlayer(iPlayer) && is_user_admin(iPlayer) )
    {
        
client_print(iPlayerprint_chat"[DEBUG] Stay away from the door man.")
    }
}

doesn't work ever. :-/ I'm not sure whyI was also told RegsiterHam touch didn't work, it's been brokenso I tried register_touch and still nothing


Arkshine 11-02-2009 04:41

Re: How would you go about catching an entity touch?
 
What map for example ? Because I don't think func_door can break. There is probably a trick with func_breakable. If so, you can remove the flag SF_BREAK_PRESSURE (4).

Styles 11-02-2009 05:11

Re: How would you go about catching an entity touch?
 
Well multiple maps. But can you elaborate on that SF_BREAK_PREASSURE? I mean, the doors are walk through able.

Arkshine 11-02-2009 05:21

Re: How would you go about catching an entity touch?
 
Map as ? Just to check.

About the func_breakable flag : Pressure (4) - Brush will break when pressured (e.g. player walking on it).

Styles 11-02-2009 05:29

Re: How would you go about catching an entity touch?
 
nvm got it thx Arkshine!

Arkshine 11-02-2009 05:47

Re: How would you go about catching an entity touch?
 
It would be nice to attach it or giving a link where I could download it.


All times are GMT -4. The time now is 17:36.

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