- Home /
Duplicate Question - http://answers.unity3d.com/questions/topics/bce0017.html
Checking a set of coordinates with an if statement
So what I basically want to do is to set two if statements. These statements will check the x and y coordinates of an assigned object. If the x and y coordinates are correct then it will access another script and add 1 to a variable. When this variable reaches a certain number I want it to advance the player onto the next level.
I have this done : #pragma strict
var CorrectCor : Vector3;
var Card : GameObject;
var ArrayScript : ArrayCorrect = GetComponent(ArrayCorrect);
function Update () {
if(Input.GetAxis(Card.transform.position.x == CorrectCor.x)) {
if(Input.GetAxis(Card.transform.position.y == CorrectCor.y)){
ArrayScript.Update();
}
}
}
But when I save it Unity tells me BCE0017: The best overload for the method 'UnityEngine.Input.GetAxis(String)' is not compatible with the argument list '(boolean)'.
I guess I don't know what I'm doing wrong, any help would be great. This is the only script giving me problems though, when I play around with the other scripts they work fine and move the player onto the next level. It's just this one sadly.
Follow this Question
Related Questions
Can someone help me fix my Javascript for Flickering Light? 6 Answers
tough syntax ? error help ... 1 Answer
BCE0017 Animations 1 Answer
Trying to instantiate random enemy prefab from array 3 Answers
Mouse look script help 1 Answer