- Home /
Question by
TheBigBang · May 09, 2014 at 11:56 PM ·
errorinputboolean
Script error? BCE0077
So im designing my game where you can click/tap to shoot anywhere on the screen i added this code
if(Input.GetMouseButton(0)("FireLaser")){
if (Time.time >= nextshot){
Instantiate(laser_pref, Vector3(transform.position.x, transform.position.y + 1, 2),Quaternion.identity);
nextshot = Time.time + fireRate;
}
}
i get the error "It is not possible to invoke an expression of type 'boolean'." and im wondering what is wrong with it? If you could help thank you!
Comment
this line makes no sense :
if(Input.Get$$anonymous$$ouseButton(0)("FireLaser")){
what is ("FireLaser") ? A custom Input setting in the Input $$anonymous$$anager? If so, then :
if ( Input.Get$$anonymous$$ouseButton(0) || Input.GetButton("FireLaser") ){
FireLaser custom tag input i should of said that in the beginning
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers
Script is not working at all 2 Answers
Scripting Errors from tutorial I was following 2 Answers
UNEXPECTED TOKEN ) PLEASE HELP ME ;( 1 Answer