Hi I am making a 2d side scroller where my ship has 3 forms. The forms are changed using Input.GetKeyDown. When my player's ship enters for instance Fire form, I would like a Particle System to envelop the players ship with a red colored aura. My problem is since I have 3 elemental auras and one ultimate aura I need to be able to tell Unity which Aura Prefab to attach to the player at the moment of input. Also how do you "stick" it to the ship so after it has changed forms the aura stays around the ship while its moving, instead of just staying at the point where it was "called"
Alot of this script isnt finished so some of the statements dont do anything yet. Thanks for the help.
As it is sometimes usefull to instantiate a prefab on input ( => Instantiate(prefab, pos, Quaternion.identity).transform.parent = transform.parent), this isn't the case here.
You should have all the particle systems you need as children of your ship. If it's Shuriken, make sure they don't pley on awake, if it's legacy they must have emit disabled. Then Play / Emit the one you need when you need it.
About sticking part, try changing the space of the particle system.
answered Mar 28 '12 at 07:20 AM
Thanks for your input guys, I understand the concept your trying to convey I just don't really understand how to execute it properly. I made the changes to my code suggested, I parent'ed my player's ship to the auras, turned the aura's emit off, and cleaned up the boolean code like suggested but I'm getting an error saying
"MissingFieldException: Field 'CompilerGenerated.__playerScriptUpdate$callable1$9336.particleEmitters' not found."
I know it's a simple solution from here but I am only a month into learning Unity/Jscript coming from Java.
this playerScript is attached to my player game object, in the inspector I have added the auras into the element fields in the correct order.
Im thinking my problem is how I'm initializing the array. Also having trouble getting to the emit in each of the children and setting it to true. I have attached the relevant code... thanks for your help.