Hi everyone! So in a script I wrote the code in a way to test the game both on PC and android, and everything works except this part.
It’s suppose to check whether right ctrl and up/down are being pressed upon collision with a specific tagged object, or ,if im using the android controls, to check if upClicked and activateClicked are true. The script worked till I mixed it up with the boolean values, and I checked the tags everything is fine.
So here it is.
var menuOptionsScript : MenuOptions;
var menuOptions : GameObject;
function Start ()
{
menuOptionsScript = menuOptions.gameObject.FindWithTag("MenuOptions").GetComponent(MenuOptions);
}
function OnCollisionStay(coll : Collision)
{
if((Input.GetAxis("Vertical" && "Right Ctrl") > 0 && (coll.gameObject.tag == "Player" || coll.gameObject.tag == "ShipLoaded" )) || (menuOptionsScript.upClicked && menuOptionsScript.activateClicked) && (coll.gameObject.tag == "Player" || coll.gameObject.tag == "ShipLoaded" ))
{
rigidbody.mass = 100;
}
Its a bit long I know but I wanted to cram it all in one line. xD
The whole thing used to work before continuing it with “||(menuOptionsScript…”.