Skip to content

Adding a new object to a module and the game

MyEyes edited this page Feb 22, 2013 · 1 revision

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

  1. 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.
  2. Find an unused typeID.
  3. Override the TypeID property to return your just found new typeID.
  4. Override the CreateServer routine. Have it return a new IGORR.Server.Logic.DummyObject, with the typeID set.
  5. Override the CreateClient routine. Have it return a new IGORR.Client.Logic.EventObject and set the texture accordingly.

###Using the object in the game

  1. Build the Module Project. (Copy the compiled dll into your content project if not done automatically)
  2. Build the Client Project.
  3. Run UpdateContent.bat
  4. Start the MapEditor. The object template should automatically be loaded in it. Place the object somewhere on the map and save.
  5. Copy the map to the Content Project.
  6. Build the Client Project.
  7. Run UpdateContent.bat again.
Clone this wiki locally