Hey everyone! I am having a lot of problems trying to get this to work. Basically I have made a RayShoot script and am trying to get Muzzle Flash working for my gun. Everytime I try to run the code I get an error:
"Assets/Scripts/RayShoot.js(65,34): BCE0031: Language feature not implemented: Ambiguous(Void Emit(), Void Emit(Int32), Void Emit(Vector3, Vector3, Single, Single, Color), Void Emit(Vector3, Vector3, Single, Single, Color, Single, Single)).
"
This is only a portion of my script. This is the error which it is pointing out:
function MuzzleFlashShow (){
if(muzzleFlashTimer > 0){
muzzleFlash.Emit = false;
light1.active = false;
light2.active = false;
light3.active = false;
}
if(muzzleFlashTimer == muzzleCooler){
muzzleFlash.transform.localRotation = Quaternion.AngleAxis(Random.value * 360 * MuzzleSpeed , Vector3.forward);
muzzleFlash.Emit = true;
light1.active = true;
light2.active = true;
light3.active = true;
}
}
It is the: “.Emit” which is causing the problem but in order for the Muzzle Flash to show when it fires I have to have the .Emit. BTW I am following a guy doing a tutorial, he says that you have to have the .Emit instead of the .emit. I have tried the lowercase .emit, it works but even when I am not firing, the lights and Muzzle Flash seem to go off.
If anyone can help me, then it would be a great help
- George