Quantcast
Channel: Latest Questions by zeuo
Browsing latest articles
Browse All 90 View Live

how 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 Article



Vector3.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 Article

script 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 Article

how 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 Article

best 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 Article


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 Article

chick what direction a cube is moving in then face it

any one know how to do this

View Article

help 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 Article


Why 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 Article


error 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

how 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 Article

what does "for" mean

example for (var i = 0; i

View Article

error 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 Article


playerprefab 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 Article

can 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 Article


how to chick the time that passed when the game was closed

ok so im trying to make a game that runs even after its been closed on android but thats not possible i cant keep the game running in the background because it will automaticly close after 8 apps have...

View Article

how to remove the unity3d splash screen

You know that image that says created with unity I don't want to replace it with my own I want to remove it I have unity pro

View Article


set lookat from a raycast

i want the object that the raycast hits so i can put it in the lookat as a variable anyone know how

View Article

how to get the child of an instanteated object

i have a rocket that i create and there is a camera inside of it i want to be able to enable and disable that camera if (GUI.Button(Rect(450,280,80,80),"Rockets")) { var bullit =...

View Article

error:Object reference not set to an instance of an object

this is driving me crazy can anyone give me any help please. the error is online 37 in var childcam: Camera var rocketpref:Transform; var shoottimer: float = 0; var shootcooler: float = 0.9; function...

View Article

how to chick weather the button is pressed or held down

sorry for my english, i have 1 button i need to chick if it is being pressed or held down how do i do this ![alt text][1] [1]: http://answers.unity3d.com/storage/temp/896-button.png

View Article


how to change the filedof view slowly

its changing but i want it to change slowly function Update () { if (Input.GetKey ("w")) { Camera.main.fieldOfView += 100*Time.deltaTime; } }

View Article


why do i get 0

//var systime:int=10; var health:float=100; function Update () { if (Input.GetKey ("up")) //systime =System.DateTime.Now.Hour; { var systime:int =PlayerPrefs.GetInt("systime");...

View Article

opposite of OnApplicationPause

is there anything like OnApplicationUnPause or anything like that i really dont want to use OnApplicationFocus its giving me a hard time

View Article

why networking example dosnt work on phone

so i downloaded the iphone networking example from their website (http://download.unity3d.com/support/resources/files/MultiplayerTutorial.pdf) i tried it on the computer and it works fine but it dosnt...

View Article


how to check or identify the polygon faces

i want to check the faces on the polygon and recreate the object but with the faces as separate objects is it possible. more info, i want to take a mesh and make all the triangles or the polygons or...

View Article

error in creating mesh script

Failed setting triangles. Some indices are referencing out of bounds vertices. is the error im new to creating meshes but i think the problem is the variables on the top i dont know what to put in...

View Article

how to make a raycast have a wider range of hit

i dont know if this makes sense or not but its like this, when you create a raycast it hits the object that's in front of it. is it possible to make the raycast hit any object on the screen no matter...

View Article

how to increase the rayspheres radius

so the script i have is suposed to render everything thats being hit i want to increase the radius but its not working ![alt text][1] [1]: http://answers.unity3d.com/storage/temp/1112-spheres.png as...

View Article



how to get component of the raycast hit

i want to get a script from the object thats being hit with a raycast but var ob :script = hit.gameObject.GetComponent(script); isnt working

View Article
Browsing latest articles
Browse All 90 View Live




Latest Images