This tutorial shows how to make a basic PolyObject in SRB2. This tutorial assumes that the user has a basic knowledge of map editing.
Contents |
Open up a new map, and create your usual stuff. Place a PolyObject Spawn in the center of the map with an angle of 1. Create a sector outside the map, about 192 × 192, and merge it with your middle sector.
Now create a sector inside that, about 128 × 128, and give it a floor height of 0 and a ceiling height of 128. Make sure the sidedefs are facing out. Set their front middle textures to whatever texture you want to display. (Don't worry about flats; they don't display.) Pick any linedef on the Polyobject, and give it Linedef Type 20, and give it the same tag as the angle of the PolyObject Spawn, which happens to be Linedef Tag 1 in this case. Place a PolyObject Anchor in the midle of the sector, making sure the Angle—like the PolyObject Spawn—is set to 1. (The PolyObject Anchor acts as the hot spot for the PolyObject, and is what it rotates around and moves related to.)
You may have noticed that if you test it now, SRB2 will crash with the following error (Or something similar):
PolyObject (tag: 1) needs line 22 for information
However, we can fix that easily: Create another sector, floor height 1 (this should be equal to the polyobject number) and ceiling height 256. Pick a linedef on the sector, and give it a type of 22 and a tag of 1. Test the game, and you should see your polyobject!
Now, a PolyObject that doesn't move is fairly pointless, right? Now let's make it move horizontally! Place a set of Zoom Tube Waypoints, angle ascending from 0, flag 0, height 64. Make a new sector, and set one linedef to "Linedef Exec Trigger - Level Load". Set another linedef on that sector to "Linedef Exec - PolyObject: Follow Waypoints" with an X offset of 32, a Y offset of 0, tag 1, and effects 3, 4, and 6 checked. Test, and your polyobject should be sliding back and forth! (You can use varying Z positions for the waypoints, and the polyobject should go up and down.)
Creating another control sector with one linedef set to Linedef Type 399. |
|
Let's get your PolyObject spinning! Simply follow the instructions above for making it move horizontally. However, do not place your Zoom Tube Waypoints, and set your Follow Waypoints linedef to PolyObject: Rotate Right, X offset to the speed you want, and Y offset to 360. Leave everything else the same. (If you would like your PolyObject to rotate the other way, set it to PolyObject: Rotate Left instead.)
MAP01, replacing Greenflower Zone Act 1.
MAP01, replacing Greenflower Zone Act 1.
MAP01, replacing Greenflower Zone Act 1.