Multi-property FOF

From SRB2 Wiki
Jump to: navigation, search
Warning icon.png
This article or section should contain one or more images. Please spruce up the article by adding an image.

Multi-property FOFs are FOFs that allow each side to have its own properties, such as textures, effects and flags. They can be created by checking the Transfer Line flag on the control linedef for the FOF. For example, this allows for FOFs with different textures on all sides, apply different effects to each side, for example making one side scroll and the others stand still, or for making some sides climbable and some not. Note that this feature is slightly unstable, and FOFs using it must be constructed in one step. For example, if you remove linedefs from the FOF or add new ones somewhere in the middle, it might exhibit crashes and other errors. Similarly, connecting the vertices of the target sector with other linedefs may lead to problems.

FOF setup

Set up a regular FOF target sector (for instance, linedef type 100) like you would do normally. At first, you should start with a simple square FOF to practice this technique. To make sure the effect works correctly, the control sector should have the exact same shape as the target sector; if it has a different shape, the target sector might exhibit unwanted effects such as missing and falsely applied textures and even crashes. You can modify the shape to some extent, such as making the control linedefs shorter than the target ones, but this is risky and might lead to errors. It's very important that you create the control sector in one step and don't modify it afterwards.

To make the game handle each side of the FOF differently, check the Transfer Line flag on the FOF control linedef, where you would normally specify the texture for all sides at once. After doing this, you can give each of the control sector's linedefs a different front middle texture. The textures will show up at the target sector exactly as they do in the control sector. This means that a linedef facing north will get its texture from the linedef in the control sector that's facing north as well.

Different effects

As an example of how effects can be applied to multi-textured FOFs, this tutorial will show you how to scroll every side of the FOF independently. For this, linedef type 505 is used. Additionally to separate linedef specials, you can also give each linedef separate flags and texture offsets when the Transfer Line flag is checked.

First of all, give every unused linedef in the control sector linedef type 505. This will make them scroll according to their front side texture offsets. The offsets determine how fast the texture is scrolled. Set them to a negative value to scroll downwards/left instead of upwards/right. For this tutorial, you may want to use a different value for each linedef, to show how the effect works.

After you have applied a scroll effect to every linedef, you will notice that you can't scroll the control linedef, because it is already used for the FOF creation. If you want this linedef to scroll as well, split it in the middle. The first one (counting clockwise) should now be used for scrolling, and the other one for FOF creation.

Samples

Sample 1

Example WAD: Sample-multitexturedfof.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This example WAD shows a simple square FOF with multiple textures.

Sample 2

Example WAD: Sample-multitexturedfof-scrolling.wad
  • This example WAD can be played in any gametype. It uses MAP01, replacing Greenflower Zone Act 1.
  • This example WAD shows an octagonal FOF with multiple textures.
  • All textures of this FOF scroll at different speeds.