Switch-Activated Doors

Much like Rise of the Triad, ECWolf supports switch and touch plate activated doors and push walls! Contrary to popular belief, it actually isn’t too hard to pull off!

In this guide by AstroCreep, you will learn how to implement these features in your own ECWolf or LZWolf project!

You need to define your triggers and tiles in your XLAT file.

In your XLAT file, navigate to the end of the triggers section under “tiles”. You need to define a door that cannot be opened normally and stays open for an indefinite amount of time.

As an example, I used the remote doors from Coffee Break by Executor:

trigger 102 //Remote Door E/W
{
    action = "Door_Open";
    arg1 = 16; //Door Speed
    arg2 = -1; //delay, set to -1 so it doesn’t close
//    arg3 = 4; //lock type, commented out
    playeruse = false; //set to false to disable use button
    monsteruse = false;
    repeatable = false;
    activatenorth = false;
    activatesouth = false;
}
trigger 103 //Remote Door N/S
{
    action = "Door_Open";
    arg1 = 16;
    arg2 = -1;
//    arg3 = 4;
    arg4 = 1;
    playeruse = false;
    monsteruse = false;
    repeatable = false;
    activateeast = false;
    activatewest = false;
}

Next, define the corresponding tiles associated with the triggers

tile 102
{
    texturenorth = "SLOT1_1";
    texturesouth = "SLOT1_1";
    textureeast = "REMODOR2";
    texturewest = "REMODOR2";
    offsetvertical = true;
}

tile 103
{
    texturenorth = "REMODOR1";
    texturesouth = "REMODOR1";
    textureeast = "SLOT1_2";
    texturewest = "SLOT1_2";
    offsethorizontal = true;
}

tile 104 //this does not need a trigger, believe it or not
{
    texturenorth = "SWITCHA1";
    texturesouth = "SWITCHA1";
    textureeast = "SWITCHA2";
    texturewest = "SWITCHA2";
}

Next, you must define the animations for the switch. Create a text file named ANIMDEFS.txt.

switch SWITCHA1 on sound switches/normbutn pic SWITCHB1
tics 0
switch SWITCHA2 on sound switches/normbutn pic SWITCHB2
tics 0

Now that your tiles and triggers are defined, you can now add the switch and remote door to your map! We'll look at how in the next step.

Open up your favorite map editor (I use WDC) and make a new project. Set MAXPLANES to 4 in the Project Information tab

WDC Project Information

Next, add your map symbols. Either navigate to Map Tools→Map Symbols, or press F9 to bring up the window.

Map Symbols

Your Map Symbols will need to match the numbers assigned to the tiles in your XLAT (In this tutorial, they are tile 102, tile 103, and tile 104).

Place the tiles where you want them in the map. Next, you must select Plane 4 and highlight the remote door tile. Select High Byte

highbyte

Input the X coordinates in the manual tile input on top of the remote door

X Coordinates

Next, select Low Byte mode and input the Y coordinates on top of the remote door tile

LowByteYCoordinates

SUCCESS!! You now have a switch activated door! This can also be used for push walls, and touch triggers can replace wall triggers as well to have touch plates!

Special thanks to Executor for being the first to implement this, and special special thanks to Sigma64 for helping me figure this out myself lmao.

(NOTE: I accidentally programmed the tiles backwards in the pics lmfao keep that in mind when doing this. 103 is N/S and 102 is E/W)