Kaev icon

GameObjectScript GameObjectAI Template

Kaev | PRO | 06/09/15 06:43:24 AM UTC | 0 ⭐ | 636 👁️ | Never ⏰ | []
C++ |

930 B

|

None

|

0 👍

/

0 👎

#include "GameObjectAI.h"
 
/*
GameObjectScript GameObjectAI Template by Kaev
Made for MMONerds.com, Modcraft.io and MCore.cc
*/
 
class gameObjectAITemplate : public GameObjectScript
{
public:
    gameObjectAITemplate() : GameObjectScript("gameObjectAITemplate") { } // GameObjectScript("gameObjectAITemplate") = Name of database entry
 
    struct structGameObjectAITemplate : public GameObjectAI
    {
        structGameObjectAITemplate(GameObject* go) : GameObjectAI(go) { }
 
        void Reset() OVERRIDE // Called on reset (e.g. OnSpawn) override
        {
 
        }
 
        void UpdateAI(uint32 diff) override // Called every tick, mostly used for timers
        {
 
        }
    };
 
    GameObjectAI* GetAI(GameObject* go) const override
    {
        return new structGameObjectAITemplate(go);
    }
};
 
void AddSC_gameObjectAITemplate // Add this to the ScriptLoader
{
    new gameObjectAITemplate();
}

Comments