- Home /
BCE0031: Language feature not implemented
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
There is no reason that Emit should be capitalized; UnityScript doesn't have properties.
Hey Jessy thanks for that! But whenever I do use a lowercase emit it works, but my muzzle flash and lights seem to keep flickering on and off even when I am not shooting :( Can anyone maybe help?
$$anonymous$$y muzzle flash and lights seem to keep flickering on and off even when I am not shooting :( Can anyone maybe help?
That's a different question. Edit this one or post a new question.
@Jessy: Unityscript does have properties actually.
private var foo : int;
public function get Foo () : int { return foo; }
public function set Foo (value : int) { foo = value; }
Answer by alteveer · Nov 24, 2013 at 12:24 AM
Hi georetro,
I am thinking that Emit wants to be "called," i.e.: .Emit(), instead of being assigned-to: .Emit = false.
See docs here: http://docs.unity3d.com/Documentation/ScriptReference/ParticleEmitter.html