I'm coding a Firelion, which is an antlion that breathes fire. I created a completely new class system so it has nothing to do with the normal antlions. I've made it use (Below) which is straight copied from the antlions, but Just replaces antlion with Firelion.
- Code: Select all
typedef CAI_BlendingHost< CAI_BehaviorHost<CAI_BlendedNPC> > CAI_BaseFirelionBase;
class CNPC_Firelion : public CAI_BaseFirelionBase
{
public:
DECLARE_CLASS( CNPC_Firelion, CAI_BaseFirelionBase );
CNPC_Firelion( void );
The problem is, The code compiles, but the NPC doesn't move. I've tried using "capabilitiesadd" and the npc still doesn't move. Its using the normal antlion model.
I was wondering would it have to do with the antlions model? I had to change all tasks, and animationevents etc from AE_ANTLION_... to AE_FIRELION LIKE SO.
- Code: Select all
DECLARE_ACTIVITY( ACT_FIRELION_ZAP_FLIP )
//Events
DECLARE_ANIMEVENT( AE_FIRELION_WALK_FOOTSTEP )
How can I tell the NPC to move?
If I use any same declaration such as AE_ANTLION_WALK_FOOTSTEP It automatically hates me and gives me .LNK errors from the antlions Object file saying its already declared. Hence, making a new class for the firelion.
Also editing firelion into the normal antlion code resulted in royally screwing the normal antlions up. So I made this totally new npc.
Last thing, I'm not sure if it has anything to do with the moving problem. But the NPC also doesn't die from explosions.
EDIT:
Current paste bin files.
npc_firelion.cpp
http://pastebin.com/US9p2HBZ
npc_firelion.h
http://pastebin.com/Aub6nFx5