Two questions about directional emitters
Hey guys.
First question: I'm making an airstrike target designator, and to do this I want to have it fire a shot that gibs into an emitter which drops a bomb from up high. Unfortunately I can't work out how to make a gib (the emitter) always face one direction on the map when it appears - it instead faces the direction that it was shot (with an 0 rad gib spread) or anywhere (with a 3.14 rad gib spread) when I want it to go straight up no matter what direction it came from. Is this do-able? I'm going to try making the emitter be slightly negatively affected by gravity so it should orient itself upwards but this seems... unreliable. It could snag on things and start pooping bombs out sideways.
I've also got plans to use this emitter to check if there is open sky above the target area, by firing a particle upwards and seeing if it hits anything for X distance and calling the airstrike only if it does not hit anything. This means I'm quite keen to get the fixed-emitter idea to work rather than using a workaround.
--- --- ---
Second question: I'm also making a cluster bomb. At the moment it breaks open 20m above ground level using Lua, gibbing an open bomb casing and two emitters which spit bombs left and right as it falls. Naturally the emitters don't -always- line up with the bomb casing which looks pretty strange when it goes wrong. I'd like to fix the emitters to the bomb casing (an MOSRotating), but Cortex Command doesn't like me attaching emitters to an MOSRotating. I lifted the code for attaching parts to things from the Dreadnought code, so what am I doing wrong? Is it impossible to do add emitters to something which isn't and actor or helddevice?
Here's the code:
Code:
AddAttachable = AEmitter // Spits bombs one way
PresetName = Cluster Bomb Emitter 1
*the rest of the emitter data*
AddAttachable = AEmitter // Spits bombs the other
PresetName = Cluster Bomb Emitter 2
*the rest of the emitter data*
AddEffect = MOSRotating
InstanceName = Cluster Bomb Open // The open casing of the cluster bomb
*the rest of the cluster bomb casing data*
AddAttachable = Attachable
CopyOf = Cluster Bomb Emitter 1
ParentOffset = Vector
X = 0
Y = -3
AddAttachable = Attachable
CopyOf = Cluster Bomb Emitter 2
ParentOffset = Vector
X = 0
Y = 3
AddAmmo = TDExplosive
InstanceName = Cluster Bomb // The bomb itself, which is Lua'd to gib above ground level.
*cluster bomb data*
AddGib = Gib
GibParticle = MOSRotating
CopyOf = Cluster Bomb Open
Count = 1
Spread = 0.0
MaxVelocity = 0
MinVelocity = 0
InheritsVel = 1
AddGib = Gib
GibParticle = AEmitter
CopyOf = Cluster Bomb Emitter 1
Count = 1
Spread = 3.14
MaxVelocity = 0
MinVelocity = 0
InheritsVel = 1
AddGib = Gib
GibParticle = AEmitter
CopyOf = Cluster Bomb Emitter 2
Count = 1
Spread = 3.14
MaxVelocity = 0
MinVelocity = 0
InheritsVel = 1
GibImpulseLimit = 350
GibWoundLimit = 2
GibSound = Sound
AddSample = ContentFile
Path = Rigal Corporation.rte/Q Device/Cluster Bomb/Bomb.wav
Buyable = 1