I created this code to make it easier to see where ships are facing by creating a line of effects extending out in front of them:

	<ItemType UNID="&itPointer;"
			name=				"direction pointer"
			attributes=			"commonwealth, EI, energyWeapon, majorItem"
			  
			level=				"2"
			frequency=			"notrandom"

			value=				"550"
			mass=				"1250"
			  
			description=		""
			>

		<Image imageID="&rsItemsEI1;" imageX="96" imageY="96" imageWidth="96" imageHeight="96"/>

		<Weapon
				type=				"missile"

				omnidirectional=	"true"
				fireRate=			"2"
				missileSpeed=		"500"
				lifetime=			"500"
				maneuverRate=		"9"
				powerUse=			"0"
		/>

		<Events>
			<OnFireWeapon>
				(block ()
					(for i 1 16
						(sysCreateEffect &efPointer; gSource (sysVectorPolarOffset gSource (shpGetDirection gSource) (multiply i 2)) (shpGetDirection gSource))
					)
					'noShot
				)
			</OnFireWeapon>
		</Events>
	</ItemType>
	
	<Effect UNID="&efPointer;">
		<!--<Starburst
			lifetime=		"2"
			spikeCount=		"8"
			spikeLength=	"10"
			primaryColor=	"0xde, 0xb7, 0xff"
			secondaryColor=	"0x89, 0x00, 0xff"
		/>-->
		<Flare
			style=			"fadingBlast"
			lifetime=		"2"
			radius=			"8"
			primaryColor=	"0xde, 0xb7, 0xff"
		/>
	</Effect>

If I set the lifetime of the effect to 1 for either effect type, often none of them are visible. However, sometimes the first 1 - 5 effects in the line for a given ship are visible, but not the rest.

This could be the result of a race condition, with one thread creating the effects and another one destroying them at the same time.

The results should instead be consistent for effects created on the same tick and it should be possible to create effects that last exactly one tick.

megas 21 Oct 2016:

This applies to missile objects too, not just effects only.

If the game runs long enough, effects are sometimes visible on the first tick. I have some effects (hitscan beams) designed to last one tick, and were given two tick lifetime. Sometimes, after the game has been running awhile, the effects are visible for both ticks instead of the second tick only. It case of hitscan beams, this results in a double beam effect that is noticeable when the attacker spins.

nms 22 Oct 2016:

Weird. In my case, it doesn't seem to matter how long the game's been running, but some of them are visible more (only?) if there are multiple ships each creating multiple effects per tick.

I would argue that it's the ones that aren't visible on the first tick (most of them) that are bugged though.