Raised This Month: $32 Target: $400
 8% 

Custom entity think


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 11-23-2014 , 11:57   Custom entity think
Reply With Quote #1

I'm trying to create my own entity with CEntity. But I ran into problems. If I use this define:
LINK_ENTITY_TO_CUSTOM_CLASS
to declare my entity, the extension doesn't call Think func for this entity. SetThink and SetNextThink don't work either. But all these functions work fine if I just spawn any default entity in the game.
CEntity version: TFDodgeball
Engine version: CSS v2230303 (Windows 7)
SourceMod Version: 1.6.3-dev+4588

PHP Code:
#define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) \
    
static CEntityFactory<DLLClassNamemapClassName##Factory(#mapClassName);

#define LINK_ENTITY_TO_INTERNAL_CLASS(mapClassName,DLLClassName) \
    
static CEntityFactory<DLLClassNamemapClassName##Factory(#mapClassName,true);

#define LINK_ENTITY_TO_CUSTOM_CLASS(mapClassName,replaceClassName,DLLClassName); \
    
static CCustomEntityFactory<DLLClassNamemapClassName##CustomFactory(#mapClassName, #replaceClassName); \
    
static CEntityFactory<DLLClassNamemapClassName##Factory(#mapClassName); 

Last edited by kadet.89; 11-25-2014 at 06:14.
kadet.89 is offline
Send a message via Skype™ to kadet.89
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 11-26-2014 , 10:39   Re: Custom entity think
Reply With Quote #2

It seems this functionality does not work, so I have to add this entities to the "thinklist" Can someone guide me in the right direction?, Where is this list? Or what shall I to read to understand how it works ?

Last edited by kadet.89; 11-26-2014 at 11:00.
kadet.89 is offline
Send a message via Skype™ to kadet.89
Reply


Thread Tools
Display Modes

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 21:44.


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