Raised This Month: $ Target: $400
 0% 

Hook an entity's touch of ground


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ezio_auditore
Senior Member
Join Date: May 2013
Old 11-06-2014 , 04:13   Re: Hook an entity's touch of ground
Reply With Quote #14

Quote:
Originally Posted by hleV View Post
Is it a single entity per map or multiple? If it's single, then you can create a wasOnGround variable for it. If there's multiple, it's also do-able but the wasOnGround part changes a bit.
PHP Code:
register_touch("blablabla""*""OnBlablablaTouch");
 
public 
OnBlablablaTouch(ent)
{
    if (
flags FL_ONGROUND)
    {
        if (!
wasOnGround)
        {
            
wasOnGround true;
            
OnBlablablaTouchGround(ent);
        }
    }
    else
        
wasOnGround false;
}
 
OnBlablablaTouchGround(ent)
{
    
// blablabla touched ground.

It's not an exact code, but it should get the idea accross.
Best answer. Thank you
__________________

Last edited by ezio_auditore; 11-06-2014 at 04:13.
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
 



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 01:59.


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