Answer by Althaen
First you need to connect an object to the script. In this example case a Rigidbody object. So save this in a variable. //Drag the prefab with a rigidbody to the prefab& slot in the inspector var...
View ArticleAnswer by Althaen
This may help you. If not them I'm not much use. :) http://docs.unity3d.com/Documentation/ScriptReference/Object.Destroy.html
View ArticleAnswer by Althaen
Have you tried to change the "Import Type" setting in your first image?
View ArticleAnswer by Althaen
I found out why it stops at 1... The code: z = (z % 3) +1; It only works 3 times. If I set it to 5 it works 5 times. If I set it to 57 it works 57 times. How do I make it go between 1-3 forever?
View ArticleAnswer by Althaen
I think this should work. static var maxSpeed = 0; private var lightOn = false; Update () { if (Input.GetKeyDown(KeyCode.Q)){ if(lightOn==false){ lightOn = true; maxSpeed = 1; } else{ lightOff = false...
View ArticleAnswer by Althaen
It's rather complex... No one is going to be able write this for you on answers. You'll have to have a lot of experience before you can attempt something like this. I'm unaware of any scripts that do...
View ArticleAnswer by Althaen
Your problem is quite simple. But it's the simple things that get you. I fixed your problem. You had a colon in a place you're supposed to place an equals sign and you don't need that second Rigidbody...
View ArticleAnswer by Althaen
One issue I see is that you've put your shooting code into a Start function. I haven't tested this code so if it doesn't work just tell me. Try this: function burstFire() { for(var i = 0; i < 3;...
View ArticleAnswer by Althaen
Place the cubes then select a cube and attach a collider to it click Component > Physics > Mesh collider, do this for each cube. I'm guessing the cubes aren't moving?
View ArticleAnswer by Althaen
These are console errors and they're telling you that some of your code is broken. Were you messing about with the example game? Check your scripts.
View ArticleAnswer by Althaen
I think you're not checking for the mouse button to be pressed so it never works. I put your onmouseenter functions into if statements in Update. I think that will work. void Update () {...
View ArticleAnswer by Althaen
Just decided to rotate the player with the camera attached to it. Works fine so far.
View ArticleAnswer by Althaen
File > Open project > Open other > find the folder with the name of your project and highlight it > Select folder
View ArticleAnswer by Althaen
All I did was make clicking on the terrain in the InputManager use SendMessage to send the lasthit recorded from the NGUI raycast to movePlayer() in the MovementManager by using UICamera.lastHit.point...
View ArticleAnswer by Althaen
Take the cast vector from the raycast and instantiate your test prefab at that point. Try something like this: public GameObject cubeClone; void SomeFunction(){ Instantiate(cubeClone, cast,...
View Article