Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- EmuDevs - (http://emudevs.com)
- Use this as your template. Make sure to point credits towards ED.
- */
- class go_tut_ai : public GameObjectScript // go_tut_ai - Class constructor, name this anything that doesn't conflict with another name
- {
- public:
- go_tut_ai() : GameObjectScript("go_tut_ai") { } // go_tut_ai, should be the same as class go_tut_ai -- GameObjectScript("go_tut_ai") - This is your 'ScriptName' that you will assign in your database
- struct go_tutAI : public GameObjectAI // go_tutAI - Structure name. This can be anything that doesn't conflict with your class constructor. 'public GameObjectAI', We're using GameObjectAI, so we call it
- {
- go_tutAI(GameObject* go) : GameObjectAI(go) { } // Setting up
- void Reset() override // Called when a go just spawns or resets in general
- {
- }
- void UpdateAI(uint32 diff) override // This function updates every 1000 (I believe) and is used for the timers, etc
- {
- }
- };
- GameObjectAI* GetAI(GameObject* go) const override // We then return new 'go_tutAI' so the script will load and work ingame
- {
- return new go_tutAI(go);
- }
- };
- void AddSC_ai_tutorial() // This is your ScriptLoader.cpp setup function
- {
- new go_tut_ai; // Call any new classes here as 'new classname;'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement