- Home /
Question is off-topic or not relevant
Incremental game need help
Hello guys,
I want to try to make a incremental game, like make it rain, or cookie clicker. I am learning unity few weeks as I go, catching whatever information I can get. But I need help with the scripts, because I can not find proper answers anywhere on the internet, I am often losing a lot of time by solving these. Please help me with few things :
Using javascript tho.
I got the background, graphic of the click thing set up, even the click counter
So when I click the gem, Gems value increase by 1-that is done
Next I would love to have a Gems Per second value under the Gems:xx But not sure how to break it down I guess counter with miliseconds and somehow display xx/s.
I've got graphics for the "miner" that gives you certain amount of Gems per second, but I need help with scripting the process. So what I need : something like if gems == 50 gems -50 start routine gems+=1/s with increasing value of the gems for example first time its 50 then its 75(you get it) each time you buy it.
"upgrade script" for changing the variable of gems per click from 1to lets say 3,6,9,20,100 etc(you know how these things works) Again this is in javascript, what I've got attached to the Blue Gem in the center :
#pragma strict var clicks : Transform; var score: UI.Text; var clicked : boolean = false; var click : int = 0; function Start () { } function Update () { score.text = "Gems: " + click; } function OnMouseDown () { click += 1; }
Thank you for your time guys !
So in short, you want us to develop your game for you? UA does not do that.
Ok So I might be up to the "Gem flow" Just need help with the part of buying the actual flow upgrade.
InvokeRepeating("Increaseflow",0, 1.0);
function Increaseflow (){
click += 1;
}
No I do not want that, I just need poke in the right direction with those problems, hint lets say.
Ok another problem I might need help with I made a script for "$$anonymous$$er" an gameobject next to the blue gem. when you click it, it should give you +2 gems every second, Which it does but only if I turn the BlueGem gameObject off
#pragma strict
var clicks : Transform;
var score: UI.Text;
var clicked : boolean = false;
var click : float = 0;
var Flow : float = 0;
function Start () {
}
function Update () {
score.text = "Gems: " + click;
}
function On$$anonymous$$ouseDown ()
{
click += Flow;
animation.CrossFade("$$anonymous$$inerclicked");
InvokeRepeating("Increaseflow",0, 1.0);
}
function Increaseflow (){
click += Flow;
}
can someone tell me what's interfering?