Hey all,
I am trying to make it so that when a crate is pushed onto a certain tile, it triggers an action that changes that crate into a frozen crate. For the visuals, I have created a a particle emission system that looks like the crate is freezing. I am having a hard time getting this to work though. Here is my code so far:
var Basic_Crate : GameObject;
public var FreezingSound : AudioClip;
var particle : ParticleEmitter;
var Freezing = ParticleEmitter;
var IceTile : Collider;
function OnTriggerEnter(other : Collider) {
if(other.gameObject.name == "IceTile") {
audio.PlayOneShot(FreezingSound);
Basic_Crate = other.gameObject;
particleEmitter.emit=true;
}
}
Please help!