Quantcast
Channel: Answers by "raoz"
Browsing all 50 articles
Browse latest View live

Answer by raoz

Well, I am using C# serialization and it works great. You can save the information as binary and it is not the easiest thing to change. Here is an example that saves two variables, int1 and string1...

View Article



Answer by raoz

function Update () { if(Input.GetKey(KeyCode.W)){ animation.Play("drive"); }else if(Input.GetKeyDown(KeyCode.S) ){ animation.Play("throttledown"); } if(!Input.GetAxis("Horizontal") &&...

View Article

Answer by raoz

Here, this should work, I tested it, but it uses arrays. Basically it reads the file at the beginning, and has a search function. Hope it works. I tested it with the following:...

View Article

Answer by raoz

This will be attached to all the things that can be higlighted with hovering. private Color startcolor; void OnMouseEnter() { startcolor = renderer.material.color; renderer.material.color =...

View Article

Answer by raoz

Use rigidbody, it is physics simulation, it has sphere, more information - http://unity3d.com/support/documentation/Components/class-Rigidbody.html

View Article


Answer by raoz

It looks like it doesn't get pressed, because it must be pressed the moment it is drawn, or something in this manner. GUI.RepeatButton works, however, because it can be already clicked. But...

View Article

Answer by raoz

Make speedincrease an array and have a pointer variable that you increase every time you increase speed. I hope you understand me. Like this: var SpeedIncrease : int[]; //Change this in inspector var...

View Article

Answer by raoz

transform.position.x it is, debug it out in the update and you see ot matches

View Article


Answer by raoz

My solution to this would be to develop your own security system, for an example, the server sends a random password to every player on connection and sends the same password when callingR PC on this...

View Article


Answer by raoz

Vector3 newPosition = new Vector3(-1,0,0) * (moveSpeed * Time.deltaTime) should be Vector3 newPosition = computerDirection * (moveSpeed * Time.deltaTime)

View Article

Answer by raoz

function spawn() { var time : int = Time.realtimeSinceStartup * 1000; if((time & 0x01) == 0) //Checking if the time millisecond count is an even number(To make it come out of random side) {...

View Article

Answer by raoz

If we say, that the index must NOT be oldindex + 1, then int ControlledRandom(int oldindex) { bool success = false; int newindex; while(!success) { newindex = Random.Range(0, max); //You need to insert...

View Article

Answer by raoz

The autoload awake might be called before the PlayerStatus Awake, thus rendering the Playerload obsolete. The reason why it doesn't give you an exeptcion is that you are initializing the exptolevel...

View Article


Answer by raoz

use rigidbody.AddForce for left and right, too. And to cap it off, I suggest a simple if block. Like, if you want to move it to the left of the screen and it has to move on x axis down until its x...

View Article

Answer by raoz

Most likely this wont affect performance. Everything inherits from object class anyways. This might affect performance a tint bit, but that wont be noticeable. Edit: typed on smartphone

View Article


Answer by raoz

You are callinng it from OnGUI. This gets called whenever it can be, possibly multiple times a frame

View Article

Answer by raoz

Here. However, this is in C# so you have to convert it to Javascript, but it should work. static string listmembers(Object obj) { StringBuilder result = new StringBuilder(); FieldInfo[] fields =...

View Article


Answer by raoz

Hi, fellow Estonian, I don't see a lot of Estonians around here. It seems to be an memory access violation, could you maybe upload the game files so I can test it? Source code would help as well

View Article

Answer by raoz

There is no way to make sure the messages are recieved at the correct time because of latency.

View Article

Answer by raoz

Get a server to do that:) Bake is a very heavy operation and will take a lot of time.

View Article
Browsing all 50 articles
Browse latest View live




Latest Images