Scripting Help: Timer Problem
Hello, I have made a game with a scene that contains a timer, here is the script. using UnityEngine; using System.Collections; using UnityEngine.UI; public class UITimer : MonoBehaviour { public Text...
View ArticleHow to add JavaScript template to MonoDevelop?
I use JavaScript for coding in my projects but there is no hints for this language in MonoDevelop. How to add them?
View ArticleHow do I respawn something after it's been disabled?
I have searched online but couldn't find a working answer. I want the tree to respawn after some time but for some reason the CurrentTimer does not go down after being set to 10. This is my code:...
View ArticleCheck distance between all objects on a list?
I'm trying to make it so an object checks how far it is from any object from a list. I have this script so far but it seems to only work with the closest one and ignores all others public var objects :...
View ArticleHow to play an audiosource and have a canvas message still show?
Basically what the title says. With the code below, when the audio plays, the text doesn't show up but shows up on the next click and the sound doesn't play. So, how do I get them to trigger at the...
View ArticlePause Menu Not Going Away
Script problem again. Tried for almost a week on figuring this out. The script I have for the Pause Menu does everything it needs to do except for close the Pause Menu after I press escape again. Here...
View ArticleTree Chopping/Harvesting cooldown
So i made a tree "harvesting" script and i want to have a cooldown for it. I dont want the player to be able to spam the button and get Wood and Exp from it. I'd like to have an cooldown system so i...
View ArticleCooldown/Timer system (Javascript)
Hi everybody, so yeah i need to get a working timer/cooldown function for my tree "harvesting" system. I want the cooldown to be 10 seconds and to function like this : I can harvest the tree once and...
View ArticleHow do I fix this script?
var quit=false; function OnMouseEnter() { GetComponent.().material.color = Color.red; //Change Color to red! } function OnMouseExit() { GetComponent.().material.color = Color.white; //Change Color to...
View ArticleHow to fix ( ArgumentException: Input Button fire 1 is not setup)
I'm making a puzzle game with some fps elements so I made a gun recoil animation, and I think I made the script correctly. I parented it to the M9 and and added audio with the animation, but now it...
View ArticleDo you need to have specific script types for different mobile platforms?
Hello! Sorry for my ignorance, but I am new to unity. I have created mobile games in Gamesalad (no coding), but when you publish your game it automatically compiles a build for whatever platform you...
View ArticleAnimator javascript
So I have my character and a trigger parameter in the animator called "gethit" and I want my caracter to change from the idle position to a getting hit state. I've made this Javascript: ![alt text][1]...
View ArticleIn-Game Browser, help needed!
Hi there, I've been working on a game for awhile now, and for some reason this seems to stump me the most. So, what I'm planning to do is try and make a working browser on the game. Another thing is to...
View ArticleScript error, cannot fix whatsoever!
Hi there, I asked a question earlier today about browsers and working in a game, but I received an answer! (Thanks to the guy who helped a lot!~) But I have an issue with it. It gives me an error that...
View ArticleWorking Browser for In-Game PC.
Hi there, I've been working on a game for awhile now, and for some reason this seems to stump me the most. So, what I'm planning to do is try and make a working browser on the game. Another thing is to...
View ArticleMissing Reference.
switch (Input.field.text.ToLower()) { case "www.blahblah.saq": // do something when they hit up www.blahblah.saq break; case "www.microsoft.com": // do something else based off the www.microsoft.com...
View ArticleType in certain URL, Open UI image. {Input Field}
Hi! I'm trying to make a little virus game called "Extract Code." But I need a bit of help on this one. When the player types a certain URL, the game will open a UI image. But I want it to play a...
View ArticleInput Field URL browser. Please help!
Now, I simply had another thread about this and it really hasn't had any support on it. I have to ask one more time. This is stressing me out, lol. I'm making a browser in my game, with an input field....
View ArticleJavascript Mathf.Ceil understanding problems
I use following code for a damage calculation all with floats: var Off_To_Def_Hits: float = Mathf.Ceil((OffForce - DefForce) / ((DefAgility * Defsize) / 2)); I used print to check the calculation. It...
View ArticleGet local hitpoint
Today is not my day for scripting -.- I've a problem I can't get out why it wont work. I guess the solution is simple. I have an object as a child of a parent. The parent is constantly moving around...
View Article