Quantcast
Channel: Questions in topic: "javascipt"
Browsing all 1875 articles
Browse latest View live
↧

Raycast : Changing hit material back to its original transparency after the...

Currently in my game I have a shot out from that player that, on collision with an object sets its transparency to a certain amount. However, I need to allow the object to change back to its original...

View Article


Type could not be resolved because of cycle

I made a simple Javascript flamethrower but I get this error: Assets/FlameThrower.js(30,9): BCE0070: Definition of 'FlameThrower.ShootShort()' depends on 'FlameThrower.ShootLong()' whose type could not...

View Article


Security camera follows player's head

Helllloooo everybody! :D I've took a camera model on the web ([Blendswap.com][1]) Picture : ![Camera Model][2] The camera has 2 bones, picture: (awesome paint skill) ![Camera bones][3] Soooooo, i want...

View Article

Help..... please..... how do I do this?

Hi! I wanted help with a script. I need a script that allows me to get one point when I collect an object. My object is collected when I click on it and this part has already been programmed....

View Article

Can anyone make a timer for me?

I need a timer to start counting up when the game starts and ends when the player dies. I need the script to be in javascript (or unityscript). This is my scoreing system in the game.

View Article


Unity Prefabs Animation Play Seperatly

Hello, I have a coin prefab with an animation attached to it. The Animation has specific x,y,z coordinates. When I drag another coin prefab in my scene and play the game, the second coin prefab moves...

View Article

Moving gameObject without user input

I am totally new to Unity so please bare with me :) I am trying to make 2D combat scene - Player vs NPC. I have player gameObject which can run both directions jump and has one attack so far. This...

View Article

I think that everything is all right...why it doesnt work correctly?

// The speed the bullet moves var Speed : float = 0.4; // The number of seconds before the bullet is automatically destroyed var SecondsUntilDestroy : float = 10; private var startTime : float;...

View Article


I can't use < or > or even + and - in my JavaScript code.

I am coding a kind of a continous cyclic code for a movement of an object in my 2D game and my problem is that apparently I can't use the name of my variable in operators (just in unity). Here is my...

View Article


Helppp mee script unity 5

convert to unity 5 var quit=false; function OnMouseEnter() { renderer.material.color = Color.red; //Change Color to red! } function OnMouseExit() { renderer.material.color = Color.white; //Change Color...

View Article

Does unity got a problem in measuring time?

I just solved a problem in my cycling code, but then another one appeared, and this one got one bug that i dont really know how to explain, but here it is: My code: function Start () { }; function...

View Article

Read Arduino Stream with Js or C#

Hi there ! I'm working on a project where i need to read a stream from arduino. I tried use C# but i'm having problems with the Read() function freezing the game, the ReadExisting doesn't recieve...

View Article

How do I resolve script issues with Unity, I am currently getting a "Unknown...

Currently i cant progress with my scripts using Java for unity 5 development, as the following two issues are appearing: Assets/Scripts/CoinSystem.js(18,4): BCE0005: Unknown identifier: 'elseif'....

View Article


BCE0005: unknown identifier: 'setInterval' + prefab wont instantiate

I don't understand why setInterval() is an unknown identifier. I am trying to spawn a prefab every second, but I only get that error. here is my script:#pragma strict public var spawning : GameObject;...

View Article

Arduino serial Read

Hi there ! I'm having a problem with some js code to read a stream from arduino. Here is the error: Error: System.NullReferenceException: Object reference not set to an instance of an object at...

View Article


Js to C# conversion without error but can't work

Hi, everyone! I had converted the following script from Js to C# in order to access the variable in another C# script. The C# codes can be compiled without errors but it just doesn't work, while the...

View Article

how to make a script that goes to the next scene if you click a gameobject in...

in the old unity i learned from a tutorial how to make a script to do that but now in unit 5 it doesn't work. can someone help me with changing the code so that it works. on this link is the tutorial...

View Article


how to Increase speed of a car.?

I'm developing a car racing game. I've used following script to move car and increase speed gradually but problem I'm facing is car is moving at constant speed.Help me to maintain speed on key down...

View Article

Getting the rotation of an object from another object within a prefab.

I'm not really even sure how to go about asking this, but here goes. My overall goal is to make a character's eyes move by adjusting the mainTextureOffset by using the rotation of some bones in the...

View Article

How to make sprite follow gameObject on trigger?

Say I have a sprite already following another gameObject immediately after its instantiated. How would I make it so that once a moving sprite (with a boxCollider trigger) collides with my sprite, then...

View Article
Browsing all 1875 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>