Question on register_think.
I'm creating an entity(not a player) and checking if players are around the area and visible to it. But I'm confused with register_think and client_PreThink. Which of them are more suitable for the entity or both of them are different from each other.
|
Re: Question on register_think.
client_PreThink -> for clients/players
register_think(... -> you choose the entity type |
Re: Question on register_think.
So, I assumed both of them works the same way just that client_PreThink is (mostly) used for players while register_think is used for entities we choose right?
|
Re: Question on register_think.
Whats the difference of prethink and postthink?
|
Re: Question on register_think.
Quote:
Quote:
|
Re: Question on register_think.
Quote:
|
Re: Question on register_think.
Pre - detect when happened
Post - detect after happend then if you want to block some event, you can do it in Pre, not Post. in Post the event is already happened |
Re: Question on register_think.
If you want to check whether a client is in range of your entity, hook think on the entity and repeatedly check for entities using find_ent_in_sphere.
|
Re: Question on register_think.
Quote:
|
| All times are GMT -4. The time now is 08:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.