WorldBuilding/MissionEditor/Markers

From TDN

This page is a Work In Progress.

Introduction

You can replace and create new markers for all the nodes in the WorldEditor. This is done by using a billboard, which will then display a alpha-based image of your node. You could place lights, which then will display a light image, or similarly a Ai function with an AI image.

Contents

Replacing Markers

First you will need the billboard for this. Here is a billboard Marker example, featuring a simple billboard facing the camera - Billboard Marker. This is man, thus used for the spawn function.

You then need to edit the markers.cs script found in the server/scripts/ folder:

// Normal Waypoints
datablock MissionMarkerData(WayPointMarker)
{
   category = "Misc";
   shapeFile = "~/data/shapes/markers/octahedron.dts";
};

// Player Spawn
datablock MissionMarkerData(SpawnSphereMarker)
{
   category = "Misc";
   shapeFile = "~/data/shapes/markers/marker_spawn.dts";
};

//------------------------------------------------------------------------------
// - serveral marker types may share MissionMarker datablock type
function MissionMarkerData::create(%block)
{
   switch$(%block)
   {
      case "WayPointMarker":
         %obj = new WayPoint() {
            dataBlock = %block;
         };
         return(%obj);

      case "SpawnSphereMarker":
         %obj = new SpawnSphere() {
            datablock = %block;
         };
         return(%obj);
   }
   return(-1);

As you can see, we changed the current marker to use ours, replacing the octahedron.dts with the marker_spawn.dts.

// Player Spawn
datablock MissionMarkerData(SpawnSphereMarker)
{
   category = "Misc";
   shapeFile = "~/data/shapes/markers/marker_spawn.dts";
};

We then add a new case like so...

case "SpawnSphereMarker":
         %obj = new SpawnSphere() {
            datablock = %block;
         };
         return(%obj);