Key to open door not working.
I've been trying for too long; can someone help? #pragma strict var Key : GameObject; var sound : AudioClip; public var LevelName ="My level name"; var Unlocked : boolean = false; if (Key == null) {...
View ArticleHow to make a save script in javascript.
I've been trying to figure out how to write a proper save/load script using java, but haven't had much luck. It seems PlayerPrefs is a pretty common (and fairly easy) way of going about it, but...
View ArticleHow do I output a value to a JS file?
Hi, I've been using Unity for a while but I am completely new to the WebGL side of things. I want to start off simple. I want to make a scene with a cube, when the cube is clicked it adds a value of 1...
View ArticleHow to change numbers in unity
hey i have a basic health script (e.g picture![alt text][1]) witch destroys the player when reached 0 so i was wondering if you could figure out how to when the bullet collides with player take away 30...
View Articlejavascript NullReferenceException: Object reference not set to an instance of...
Hi everyone. Well, i'm trying to make an Armor system for my RPG like game. But i'm having trouble setting the starter armor value to the character when it is first instantiated. First, i have a script...
View ArticleWeb GL server problems
Hi everyone testing my Web GL project locally is fine no errors, I use my ftp client to upload it to the server. Try to run it and then a window pops up with the following message: "An error occured...
View ArticleGUI.Button works fine in editor but not showing after built (JS)
I drew a button in a script, it's showing in the editor just fine but when I built the game, the button could not be found. I tried scaling it till it fills up the whole screen view but still when I...
View Articlewhat is unity game javascript course?
I try find javascript course but can't find anything. it just all about html in that. that not what i want. I want and need a complete only javascript course. Is anybody know anything about this?...
View Article[Urgent] Finding Nearest Target
Hello as the title said this is urgent! I need to finish up the ai for my game before Next WEEK!! I need help getting the ai to find the nearest player. This is my basic code : var Distance; var Target...
View ArticleC# or Javascript for enemy AI
I'm sorry if this has already been answered, but I could not find this anywhere in the forums. I have been working on a game in Unity and will be starting on enemy AI soon. My question is which...
View ArticleJava Script: Ambiguous reference
Hi I'm a beginner and I'm trying to write a simple code for jumping using AddForce, but I don't understand what does this error mean: > Assets/Jumping.js(16,17): BCE0004: Ambiguous reference...
View ArticleUnityObject2 not defined in WebGL jslib plugins?
Hi there - I'm trying to convert a game from the webplayer to webGL. I read that the preferred way of talking with the browser is through plugins, so here's my plugin code: var BrowserInfoPlugin = {...
View ArticleHow to execute code after X seconds
Hello. I know this question has been asked before but i couldnt get it to work properly I am new in Unity and really bad at coding so that's why I am asking something so obvious for some people like...
View ArticleCollider not working
Hello everyone! I did this tutorial on time trial system and it seem when colliding with the object nothing happens. And this error appears: "NullReferenceException: Object reference not set to an...
View ArticleSmooth AutoMove Script?
I'm making a intro cut scene for a game but I need a smooth auto Move script that moves my camera in any derection smoothly on start and I need to be able to change the speed. I have looked everywhere...
View ArticleFPSController doesn't climb ladders
I've been trying to make the FPSController (the one that comes within unity) capable of climbing ladders. I've used this script that I saw in the forums and attached it to the ladder: #pragma strict...
View ArticleI really need help with this message
I am sending a message to an object, asking it to print some numbers for testing, but when I activate it, it returns a NullReferenceException. What did I do wrong? Sending End: Declare: var bomb :...
View ArticleIt appears that NullReferenceException: Object reference not set to an...
It informs that NullReferenceException: Object reference not set to an instance of an object PickUp. OnMouseUp () (at Assets/scripts/PickUp.js:13) UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32)...
View ArticlePlease help
I got something like that under my all java scripts "The associated script can not be loaded. Please fix any compile errors and assing valid script" on every restart computer, with that that comes...
View Articlewhat does this error mean? javascript
this is the first time i've seen this error (which to be honest isnt totally shocking im building the both longest and hardest game ive ever had to program) this is the mystery error Failed to call...
View Article