I’ve multiple clocks counting down… for researching, building something and a general clock for the game…
Research scripts are multiple instance and game is a single instance…
Script name for both differ… I made sure every variable.name is different, as the text elemets to display the clocks ( alarm clock and hourglas);
As far as I know, if remainingTime is a number, you can just do element.text = remainingTime. I also suggest to check the value of remainingTime if that doesn’t work.
I see… and sure I implemend… but …
there are two different scripts: Counter.js (for Hourglas and watch)
and Timer.js (for arlam clock)
I know JS is not to accurate for accessing varibales, and ‘Text’ is not a very
good name…
sorry …
I’ve a first testing of the game tomorow to see reacting a.s.o.
(LAN party with friends, so they have to),
There’s so much to do ( win 3 of 5 or 5 of 7) including reset the game …
but I’m afraid all I get from testing is the clocks shows wrong
I disagree here. JS is rules on how scope works but the rules can be complex
that should slow me down… maybe I’dont know all JS… but I would’t like to know what i Did wrong
I’ve laeand about JS types like null, ukown , object, numer and boolean?
I’m not really sure about scope…:
i do single instanc e = instane
and multi Instances = this.instance…
Is assigning the value to a property on the this object which in this case, the pc.ScriptType instance and is therefore accessible in any function of this pc.ScriptType