Raised This Month: $12 Target: $400
 3% 

Stickybomb Think Hook


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 08-23-2014 , 05:40   Stickybomb Think Hook
Reply With Quote #1

PHP Code:
public OnEntityCreated(entity, const String:classname[])
{
    if (
StrEqual(classname,"tf_projectile_pipe_remote"false))
    {
        
SDKHook(entitySDKHook_PreThinkOnPreThinkPost);
    }

Code:
L 08/23/2014 - 04:35:14: [SM] Native "SDKHook" reported: Hook type not valid for this type of entity (165/tf_projectile_pipe_remote)
L 08/23/2014 - 04:35:14: [SM] Displaying call stack trace for plugin "sticky.smx":
L 08/23/2014 - 04:35:14: [SM]   [0]  Line 291, C:\frog\tf\addons\sourcemod\scripting\sticky.sp::OnEntityCreated()
L 08/23/2014 - 04:36:39: [SM] Native "SDKHook" reported: Hook type not valid for this type of entity (42/tf_projectile_pipe_remote)
L 08/23/2014 - 04:36:39: [SM] Displaying call stack trace for plugin "sticky.smx":
L 08/23/2014 - 04:36:39: [SM]   [0]  Line 291, C:\frog\tf\addons\sourcemod\scripting\sticky.sp::OnEntityCreated()
What are my alternatives to hooking stickies for every frame?

Or would I just have to settle for a 0.1 timer?

...

For every sticky?


While we're at it, what's the difference between

SDKHook_PreThink,
SDKHook_PostThink,
SDKHook_Think,
SDKHook_PreThinkPost,
SDKHook_PostThinkPost,
SDKHook_ThinkPost,

Edit: While testing all of these different "Think" hooks I must've missed SDKHook_Think. Trying it again, and it works fine for my stickies.

But my question still stands.
__________________

Last edited by Chdata; 08-23-2014 at 05:44.
Chdata is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 08-24-2014 , 06:00   Re: Stickybomb Think Hook
Reply With Quote #2

The thinks fire in different orders, as they are labeled...
Diferent events will happen depending on each callback. You will find that some netprops will be updated on say think, so you can use thinkpost. If you try to update them too early, you'll end up being behind, so you'll run into problems overwriting them.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Reply



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 17:22.


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