Homeworld Effects Manual: setEffAttachParent()
setEffAttachParent(int flag)
Any effects spawn()ed will have parent ship's co-ordinate system.
Legal values: integers
Default value: 0
If flag is 0, this is inactive, and it is active otherwise.
If flag is zero, the spawn()ed effect will inherit the co-ordinates and velocity of its parent at the moment it is created. If the parent turns or changes velocity, the two will diverge. Setting flag to 1 keeps the two together.
This is very useful for hyperSpaceEvents. By default, hyperSpaceEvents are attached to the hyperspace window, which moves past the hyperspacing ship. By spawn()ing another effect attached ot the parent ship, ship-specific hyperspace is much easier. No longer is it necessary to know how fast the window is moving and move the effect backwards to attempt to counter it.