Minefields

From FreeSpace Wiki
Revision as of 22:58, 30 July 2007 by Shade (talk | contribs) (New page: An oldie but goodie. You've seen them in Derelict, and here's how to make them yourself. First of all, although this may change in the future, there is currently no "Mine" ship/weapon...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

An oldie but goodie. You've seen them in Derelict, and here's how to make them yourself.

First of all, although this may change in the future, there is currently no "Mine" ship/weapon type in FreeSpace. This means all the mechanics of the minefield have to be constructed by hand, using events and certain ship properties. For now, we'll imagine using the TTC 1 container - The very same one used in Derelict.

The first thing to do is to lay down the containers in the desired pattern. Once that is done, enter the ships editor and enable "Special Explosion" for each of the containers. While doing this, also adjust the size and strength of the explosion to fit the mission, as the default may not be suitable for your needs.

With that done, enter the events editor and make an event like this:

The every-time-argument conditional SEXP used in this event is something that was not available to the makers of Derelict, and in a situation like this it is quite a time saver. Those not using the SCP will have to make a seperate event for each mine in the minefield, but otherwise the principle is the same as that described below. As we are using the SCP-only SEXP in this example, we first have to set up an argument list that contains the names of the objects which are doubling as mines. These have to be typed in by hand, as ship names do not appear in the "Add Data" section for argument lists.

The second part of the event is a distance check, which in this case evaluates if any friendlies are within 250m of any one of the mines - That's why we're using an argument list, so we don't need a seperate event for each mine. And finally, if any friendlies do come close enough to a mine, it is destroyed using sabotage-subystem for 110% of its health.

Now, this in itself does not create a mine. But combined with the special explosion we enabled earlier, any container that is destroyed is going to go out with a bang, and any ships that are close enough are going to take damage. And that's all there is to it.

Things to vary depending on mission needs are the size and strength of the special explosion, the trigger distance, density and number of mines, as well as which ships are able to trigger them. In some cases, it may be prudent to limit the trigger to only work for player ships, as the AI is not equipped to deal effectively with the threat of mines.

One word of warning, though: Minefields should be used sparingly. They can work well as a novelty and a change of pace, but if a player is faced with them on every other assault mission, they can go from interesting to tedious very quickly.