The scripting language used by the Unity3D game engine. Sometimes called "JavaScript", despite being a very different language.
-1
votes
0answers
22 views
I'm trying to do is draw some lines and when they collide with some object, a warning is displayed [on hold]
Basically what I'm trying to do is draw some lines and when they collide with some object, a warning is displayed. The functions with which I am basing are the oncollisionenter to detect collisions, ...
2
votes
2answers
41 views
unity3d move by touching
I'm going to create Android app where I move gameObject on X and Z cords by touching,gameObject have to move right, left, up or down. I have written this script which belongs to gameObject where I ...
1
vote
1answer
31 views
convert javascript to unityscript
I am using javascript to make 2d game.
I hope to migrate the same play method to 3d(unity).
The model/controller are written in javascript,
it needs to be converted to unityscript,
Is there an ...
0
votes
2answers
69 views
How can I address a script I don't know the type of?
My game uses a variety of different game modes, and I'd like to spawn a different GameController script at the beginning of the scene depending on the game mode selected. Then other items (e.g., ...
0
votes
1answer
72 views
Unity4 and Prime31 Game Center Plug-in Event
I'm still new when it comes to C# programming (I normally use Unityscript). I have the Game Center plugin up and running successfully, except for one thing...
When an achievement is accomplished, the ...
0
votes
0answers
52 views
Unity3d - Two input buttons at once - delay in event triggering
I'm making a game for two players. They both have a button that they can press to charge a meter, and then release to perform an action depending on how long they charged the meter.
I'm using left ...
0
votes
2answers
87 views
How to spawn enemies in a mixed pattern based off ratios
Let's say you have four enemy types: Basic, Strong, Poison, and Flying. For each level in the game, they each have their own spawning frequencies, which results in ratios of: 0.4, 0.3, 0.2, and 0.1 ...
1
vote
2answers
156 views
yield waitforseconds() not working
I have the following code in a player object:
function Start ()
{
GUI = GameObject.FindWithTag("GUI").GetComponent(InGameGUI);
}
function OnCollisionEnter(hitInfo : Collision)
{
...
-1
votes
1answer
65 views
Unexpected char error
Can someone tell me what is wrong with this script?
#pragma strict
private var dead = false;
function OnControllerColliderHit(hit : ControllerColliderHit)
{
if(hit.gameObject.tag == "Respawn")
...
1
vote
0answers
34 views
Function Downcasting in UnityScript
I actually posted this on the Unity forums, but none of my language-related questions ever seem to get answered there. So, let's say I have a function defined as so in Unity Script:
function ...
0
votes
1answer
84 views
Synchronization in Multiplayer in Unity3D
I am working on a Unity Network game in which I have two players which have some basic moves. One player is controlled by the server and the other player is controlled by the client.
To accomplish ...
1
vote
2answers
180 views
Unity: Climb Ladder
I've been working in Unity on a first person game, and came across a feature I want to add: climbing ladders. However, I have been unsuccessful in coding this so far(btw I'm using javascript). Below ...
0
votes
0answers
48 views
Unity Browser Communication - Getting loaded state
is there any way to get the state if an unity webplayer-object is loaded? Currently I'm creating an gameObject that sends and externalCall to my Browser, but this is really just a workaround, there ...
3
votes
1answer
54 views
float division in unityscript
Why does this code give 536870912 as output and not 536870911.5?
var z : double = 1073741823.0 / 2.0;
Debug.Log(z.ToString("F15"));
And how can I get it to output 536870911.5?
This seems odd to ...
0
votes
0answers
92 views
Reading and parsing a file inside HTML using javascript
I have a text files on my desktop which continuously gets updated(new rows gets appended to it) .I am trying to create a code which can read this data continuously (and possibly parse - next step) and ...