-
Notifications
You must be signed in to change notification settings - Fork 2
Levers
Levers are used to switch the state of the associated type back and forth.
Levers are located inside the levers folder which contains additional folders to further differentiate the type of lever that is being defined
These subfolders are:
- basic
- countdown
- sand
Inside each of these folders one further folder called textures exists.
E.g.: switchBlocksMod\levers\basic\textures
Levers are defined by a lever{screennumber}.xml file, as the name implies levers are defined by what screen they appear on, counting starts from one.
The file may begin with an xml header, but it is not needed. The Levers tag however has to be the last element in the xml file.
You may then add any amount of Lever tags inside of it.
A Lever tag then requires two more tags
TexturePosition
The position tag then contains X and Y
Path to file
switchBlocksMod\levers\sand
File
levers2.xml
<?xml version="1.0"?>
<Levers xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Lever>
<Texture>lever</Texture>
<Position>
<X>176</X>
<Y>160</Y>
</Position>
</Lever>
<Lever>
<Texture>lever_red</Texture>
<Position>
<X>240</X>
<Y>160</Y>
</Position>
</Lever>
<Lever>
<Texture>lever_blue</Texture>
<Position>
<X>304</X>
<Y>160</Y>
</Position>
</Lever>
</Levers>
This would define three levers for the sand type on screen two at respective positions with textures found in the textures folder