I believe I have a better idea, gentlemen. It will require two pofs, one or more animated textures, two table entries, and one sexp per mission with a repeat count of 999999999. No further code work should need to be done.
Steps involved:
1) Create an animated texture to be used as the apparent cloud effect:[list=a]
- Make a convincing animation that looks like dust clouds floating towards the player. One could probably use a couple of the nebula poof PCXs for this quite easily.
- Over each frame of the animation, overlay an alternating grid of pure green pixels like so:
[/li][/list]
x[color=green]o[/color]x[color=green]o[/color]x
[color=green]o[/color]x[color=green]o[/color]x[color=green]o[/color]
x[color=green]o[/color]x[color=green]o[/color]x
[color=green]o[/color]x[color=green]o[/color]x[color=green]o[/color]
x[color=green]o[/color]x[color=green]o[/color]x
- Compile to a Freespace2 ANI file.
2) Create a spherical pof whose polygons have their normals facing
inwards, and map it with a texture with the same name as the ani you just made in step 1. Convert for FS2.
3) Create another pof shaped like a wall or something (be creative as you see fit) to be the edge of the nebula for when the player is out of it. Texture it with a single frame nebula poof PCX (not an ANI) that has also had the alternating green grid applied to it.
4) Add table entries for the sphere and wall, marking them with the "navbouy" and "stealth" flags. Also make them Shivan so they will by default not appear on the radar.
5) In Fred2, create instances of these new nebula pofs, positioning the wall (or walls, if you like) wherever it needs to be (I suggest placing it parallel to one of the three major planes, such as the XZ plane, in order to keep life simple later), and the sphere at the same location as the player.
6) Set up a sexp event with a repeat count of 99999999 such that whenever the player's location is on one side of the wall, the sphere has its position moved to the location of the player using the set-ship-position sexp, and whenever the player is on the other side of the wall, it does not have its position changed. You will be making use of the get-object-x, get-object-y, get-object-z, and set-ship-position sexps to do this:
(Assuming the wall is parallel to the XZ plane and positioned at 0,0,0)
when
>
get-object-y
Alpha 1
0
set-ship-position
LocalNebulaSphere1
get-object-x
Alpha 1
get-object-y
Alpha 1
get-object-z
Alpha 1
Using this event, whenever Alpha 1's y value is greater than zero, the nebula sphere will follow him around, re-centring on him every second, but if it is less than zero (i.e. he has flown beyond the wall), it will not be re-centred on him. When he is outside of the sphere the normal will be facing away from him, so he won't see it. Instead he will see the wall.
The only problem with this system is that the transitions would be abrupt, but by making two or three sphere pofs of different sizes (you still only need one table entry if you just use the change-ship-model sexp) you could improve things somewhat by having them nest inside each other, and only follow Alpha 1 around at different distances beyond the wall.