AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Unable to detect entity touch (https://forums.alliedmods.net/showthread.php?t=221608)

Kia 07-24-2013 09:22

Unable to detect entity touch
 
Hello everybody,

I try to make the jumppads from Ricochet Maps working in Counter-Strike using this code here :

PHP Code:

public pfn_touch(ptrptd)
{
    
client_print(ptdprint_chat"Touch detected!")
    new 
szClassname[32]
    
entity_get_string(ptrEV_SZ_classnameszClassname31)
    
    if(
equali(szClassname,"trigger_jump"))
    {
        
client_print(0print_chat"Touched trigger_jump")
        new 
Float:velocity[3];
    
        
entity_get_vector(ptdEV_VEC_velocityvelocity);
        
velocity[2] = 500.0;                
        
entity_set_vector(ptdEV_VEC_velocityvelocity);
    
        
entity_set_int(ptdEV_INT_gaitsequence6);  
    }


But it always shows me only the first message, the second gets never called.
This Code proofs that they are trigger_jump entitys.

PHP Code:

public func_SearchEntity(id)
{
    new 
ent = -1
    
while((ent find_ent_by_class(ent"trigger_jump")))
    {
        
client_print(idprint_chat"trigger_jump found!")
    }


Anyone knows what I'm doing wrong?

ConnorMcLeod 07-24-2013 09:26

Re: Unable to detect entity touch
 
Show entity creation.

Kia 07-24-2013 09:37

Re: Unable to detect entity touch
 
1 Attachment(s)
Entity is already at map.

ConnorMcLeod 07-24-2013 09:50

Re: Unable to detect entity touch
 
And trigger_jump exist byu default in counter-strike ?

Kia 07-24-2013 11:46

Re: Unable to detect entity touch
 
No. I tried using BSP Compat Plugin to change name, but also didn't work.

ConnorMcLeod 07-24-2013 15:45

Re: Unable to detect entity touch
 
What entity replacement have you put ?

Try some existing trigger_***

Problem may be solid properties that is SOLID_NOT, or can be size that is too small, check it.

Kia 07-24-2013 16:06

Re: Unable to detect entity touch
 
I replaced it with rc_jump, but also didn't work. Using BSPViewer shows me a small box at the entity, but it should be big enough.

How do I check if the entity is solid? Maybe I should say that the entity is invisible.

ConnorMcLeod 07-25-2013 02:31

Re: Unable to detect entity touch
 
rendering has no importance here

Kia 07-25-2013 03:09

Re: Unable to detect entity touch
 
func_wall is working, trigger_jump isn't.


All times are GMT -4. The time now is 06:28.

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