chick the distance between players position.x and enemys position
so i tried using this code below but it only works with position not position.x and x is what im trying to find any help if ( Vector3.Distance(player.position, transform.position.x) > 5) {...
View Articlehelp with Mathf.Abs
i have a script in the script if a cube moves to far from the player he comes back but the opposite sides are not working if( Mathf.Abs(player.position.x - transform.position.x) > 8 ) {...
View ArticleWhy i cant press(use) joystick and gui button at the same time ????
im working with android and i use the joy stick to walk around and the guy button to shoot, but i cant do them both anyone know why
View Articleerror when trying to display number in text area
so i have this points = GUI.TextArea (Rect (70, 10, 50, 20), points, 10); and static var points: int = 0; in another script i get an error can not convert int to string i know what it means but i dont...
View Articlehow to make a button click able after a few seconds
every rpg game has skills and when u click on them then there is a cooldown time where you cant click on the button again im trying to make that in unity but its not working i dont want to use...
View Articlewhat does "for" mean
example for (var i = 0; i < Input.touchCount; ++i) { if (Input.GetTouch(i).phase == TouchPhase.Began) { Application.LoadLevel ("1"); what does for mean is it diffrent from if and where is it used
View Articleerror in saving player prefab
im trying to save the player prefab but im getting an error The best overload for the method 'UnityEngine.PlayerPrefs.Save()' is not compatible with the argument list '(String, int)'. i have...
View Articleplayerprefab not saving score
so i have a script that has veriable called intel and i want it to save but its not saving any ideas im using the PlayerPrefs.Save(); in the update and in the late update but when i force stop it in...
View Articlecan xml be used in anrdoid??
im trying to save score and i really dont want to use playerprefab so im tyring to work with xml and it worked in the editor but not on the phone. i tried force stoping my application from the manager...
View Articlehow to make the player damage one enemy
i have a simple script that when it collides with a gameobject it loses health but the problem is that every enemy in the game with the same script losses health. i know why this is happening but i...
View ArticleVector3.Distance error plizzzzzz help
im always getting a NullReferenceException: Object reference not set to an instance of an object at line 4 no matter what i try, there is a game object with tag Enemy but it wount work function Update...
View Articlescript not working on second character
so i have a script here it works fine but then it doesnt work on the second character even thou they are copys of each other anybody know what im doing wrong var waypoint : Transform[]; static var...
View Articlehow to remove x and z constraints
if i use RigidbodyConstraints.None then it will remove everything i only want to remove the x and y
View Articlebest way to make a machine gun?????
i know how to make a machine gun but it has a lot of bullets and im trying to make it for android so thats not gona work, is there a way to make a machine gun that looks like its shooting alot with out...
View Articlechick the distance between players position.x and enemys position
so i tried using this code below but it only works with position not position.x and x is what im trying to find any help if ( Vector3.Distance(player.position, transform.position.x) > 5) {...
View Articlehelp with Mathf.Abs
i have a script in the script if a cube moves to far from the player he comes back but the opposite sides are not working if( Mathf.Abs(player.position.x - transform.position.x) > 8 ) {...
View ArticleWhy i cant press(use) joystick and gui button at the same time ????
im working with android and i use the joy stick to walk around and the guy button to shoot, but i cant do them both anyone know why
View Articleerror when trying to display number in text area
so i have this points = GUI.TextArea (Rect (70, 10, 50, 20), points, 10); and static var points: int = 0; in another script i get an error can not convert int to string i know what it means but i dont...
View Article