Beacon/Particle System Help

Hello Unity Community! I’m in a part of my game where there is a large area to explore, but no guidance on where to go to next. I’m trying to solve this by enabling a beacon(particle system). Problem is, the particle system doesn’t always turn on. The way that this script works, is that if I have mark enabled, the renderer for a 3D arrow will appear, and if I have beacon enabled, a tall particle will act as a beacon. I have both of these enabled, but the script is turned off. The script will become active when something else happens, i.e. gameObject.GetComponent(“BeaconScript”).enabled = true;

Is there a way I can fix this? I know particle Systems can get a bit tricky.

#pragma strict
#pragma implicit 
#pragma downcast
var mark = false;
var beacon = false;
var glow : Light;
var beaconFX : ParticleSystem;

function Start(){
	if(beacon){
		beaconFX.enableEmission = true;	
	}
	if(!beacon){
		beaconFX.enableEmission = false;		
	}
}

function Update(){
	if(mark){
		renderer.enabled = true;
		glow.light.enabled = true;	
	}
	if(!mark){
		renderer.enabled = false;
		glow.light.enabled = false;	
	}
}

function OnTriggerEnter(other : Collider){
	if(other.tag == "Player"){ 
		if(renderer.enabled == true || beaconFX.enableEmission == true){
			mark = false;
			beacon = false;
			DoSomething();
		}
	}
}

function DoSomething(){
	Debug.Log("CHECKPOINT REACHED!");
	//DO THE REST!
	beaconFX.enableEmission = false;
	Destroy(gameObject);
}

It might be a problem with the particle system, are you just emitting one huge particle? My guess would be to try making a beacon with lots of little particles. If you just want one big texture that always rotates toward the camera, I would try making a large plane, and adding this script to it
http://wiki.unity3d.com/index.php?title=CameraFacingBillboard

If you have your heart set on a particle system, instead of enabling it to emit, try particleSystem.Emit(1)

If you have anymore questions feel free to PM me on the forums (I don’t get notifications if you reply here for some reason)
Good luck on your game!

It’s many particles moving upwards, and I tried the plane thing, but I didn’t use that script. I’ll try this new trick right quick.

Actually, it didn’t work. Does Emit(1) means emit 1 particle at x increments of seconds? If so, I don’t really want that, the beacon is made of many particles. I tried taking out if(!beacon){ beaconFX.enableEmission = false; } since the Emission tab is turned off at start, but nothing.

oh, I think you just forgot to Play the system, the system is enabled to emit, but you havn’t told it to emit. I havn’t worked with the system in awhile, I forgot it works with particleSystem.Play and particleSystem.Stop. Just enable the system and play it after.

Hope that works

None of these worked.
I’ve tried

	if(beacon){
		//beaconFX.enableEmission = true;
		beaconFX.particleSystem.Emit(1);
		beaconFX.particleSystem.Play();
	}

Either I’m doing it wrong, or I’ll have to find another way to start emitting particles.

BUMP