Adding a new object to a module and the game - MyEyes/Igorr GitHub Wiki
Example
Assume we already have a module and want to add a new object. For simplicities sake we will assume that the object does not really do anything.
###Adding the object to the module and setting it up
- Add a new template to the module: Create a new class in the module project and let it inherit from ObjectTemplate. Alternatively copy an existing template and change its name.
- Find an unused typeID.
- Override the TypeID property to return your just found new typeID.
- Override the CreateServer routine. Have it return a new IGORR.Server.Logic.DummyObject, with the typeID set.
- Override the CreateClient routine. Have it return a new IGORR.Client.Logic.EventObject and set the texture accordingly.
###Using the object in the game
- Build the Module Project. (Copy the compiled dll into your content project if not done automatically)
- Build the Client Project.
- Run UpdateContent.bat
- Start the MapEditor. The object template should automatically be loaded in it. Place the object somewhere on the map and save.
- Copy the map to the Content Project.
- Build the Client Project.
- Run UpdateContent.bat again.