Now that we have the actor for our object defined and completed, we need to add a map definition so that we can start putting it into our maps!
To implement this, you will need to have an XLAT (Map Translator) file. To learn more about what the XLAT can do, AstroCreep has a guide The Anatomy of an XLAT File that is worth reading.
If you don't have an XLAT file yet, create one now. This can be called anything, but xlat.txt is traditionally an easily identifiable name.
We're only adding one object, and plan to use the rest of Wolfenstein 3D's original list. As such, we include this line at the top of the file to "copy" the xlat of our base game:
include "$base"
In the XLAT, different elements like Walls, Objects, and Floors/Ceilings (Flats) are declared with their tile values in the map. ECWolf uses this information to work out what has been placed in a map.
Our torch is an actor to be placed in the map, and as such, we'll want to use the things structure.
things
{
{300, NewTorch, 0, 0, 0}
}
Most actors listed in the things structure follow this pattern:
{ tilenumber, actor, angles, flags, minskill }
So in our above structure, we have linked the tile number 300 to the actor NewTorch. As it's a flat sprite with no extra properties, we leave the other values at 0. If you wanted the column to only show up if the player selects a higher difficulty, you'd set the minskill value according (Difficulty 1 being 0, and Difficulty 4 being 3).
If you haven't already, make sure your XLAT file is declared in the gameinfo structure of your MAPINFO file. If it isn't yet, put the following line in the structure, . If you called it xlat.txt and put it in a folder you created called /xlat, you would put the following:
translator = "xlat/myxlat.txt"
If it is named differently or in a different location, change the value of translator to reflect that.