super noob here
I’ve been searching for hours on how to create a particle trigger script online, although I’ve found many examples none of them seem to work.
all i want to do is have an item trigger a particle emitter that I’ve created. when it comes to programming i have 0 experience and I’m basically learning as i go. I’ve copied bits and pieces of codes from here and there and feel that i have started the script correctly but its not working. how do i reference the particle prefab that i have created to the trigger?
does seem right to anyone? do i have to include a tag in the script since its supposed to interact with an enemy.
#pragma strict
var freezeCloud: ParticleEmitter;
function Start ()
{
}
function OnTriggerEnter(freezeCloud:Collider){
particleEmitter.emit=true;
}
function OnTriggerExit(freezeCloud:Collider){
particleEmitter.emit=false;
}