Try this code instead for NTCPowerupSpawner.
class NTCPowerupSpawner : public GameObjObserverClass
{
friend class NTCPowerupControl;
friend class NTC_Powerup;
public:
NTCPowerupSpawner(int SpawnerID, bool Enabled, const char *Preset, Vector3 &Position, int MaxSpawnCount, float SpawnDelay);
virtual void Timer_Expired(GameObject *obj, int number);
int Get_Spawner_ID();
void Toggle_Spawner(bool Enable);
void Spawn_Powerup(bool Decrease);
void Entered( GameObject* pObj, GameObject* pEnterer ) {}
void Exited( GameObject* pObj, GameObject* pExiter ) {}
void Attach ( GameObject* pObj ) {};
void Detach ( GameObject* pObj ) {};
void Animation_Complete ( GameObject *pObj, const char *animation_name ) {};
void Created(GameObject* pObj) {};
void Destroyed(GameObject* pObj) {};
void Killed(GameObject* pObj,GameObject* pKiller) {};
void Damaged(GameObject* pObj,GameObject* pDamager,float amount) {};
void Custom(GameObject* pObj,int type,int param,GameObject* pSender) {};
void Sound_Heard(GameObject* pObj,const CombatSound & sound) {};
void Enemy_Seen(GameObject* pObj,GameObject* pEnemy) {};
void Action_Complete(GameObject* pObj,int action_id,ActionCompleteReason complete_reason) {};
void Poked(GameObject* pObj,GameObject* pPoker) {};
const char* Get_Name() { return "NTCPowerupSpawner"; }
protected:
void OnThink();
void Remove_Powerup();
bool Can_Spawn();
void Force_Spawn_Powerup(bool Decrease);
GameObject *Create_Timer_Object();
void Start_Timer(float Delay = 0);
GameObject *Get_Object(int &ID);
void Remote_Spawn_Powerup(bool Decrease);
private:
int _SpawnerID;
bool _Enabled;
StringClass _Preset;
Vector3 _Position;
int _SpawnsRemaining;
int _Item;
bool _SpawnPending;
float _SpawnDelay;
int _TimerObject;
};
Since NTCPowerupSpawner isn't a script (it doesn't have a ScriptFactory and it isn't created via Create_Script), it should not derive from ScriptImpClass but instead from GameObjObserverClass.