Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Client Crash
Re: Client Crash [message #484516 is a reply to message #484515] Wed, 20 November 2013 17:00 Go to previous messageGo to previous message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma:
General (3 Stars)

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.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: windows 8.1 not working with my scripts
Next Topic: WeaponBag
Goto Forum:
  


Current Time: Sun Dec 22 08:14:04 MST 2024

Total time taken to generate the page: 0.00750 seconds