Hey, I'm right now creating a map, which needs some timers above units.

So basically I create a floating text and update it each second, reading the value of the timer.

So I did do it with GUI at the moment, but if you offer a solution in jass it is okay too.

What I did:

I did devide the string into 3 parts.

First Part: Convert Int to String, Convert Real to Int, Timer Remaining Time / 60

Second Part is literally a ":" (colon)

Third Part: Convert Real To Formatted String (2,0), Convert Int to Real, Convert Real to Int, Math - Modulo (Timer Remaining Time MOD 60)

Problem:

The Timer looks like: 1:16.0 and 1:9.0

But i wanted: 1:16 and 1:09

Edit:

At the moment I can only think of writing a method which changes "9" to "09" and leaves "16" as "16" myself, via jass or gui.

But is there anything prescripted I could use?

So basically I create a floating text and update it each second, reading the value of the timer.

So I did do it with GUI at the moment, but if you offer a solution in jass it is okay too.

What I did:

I did devide the string into 3 parts.

First Part: Convert Int to String, Convert Real to Int, Timer Remaining Time / 60

Second Part is literally a ":" (colon)

Third Part: Convert Real To Formatted String (2,0), Convert Int to Real, Convert Real to Int, Math - Modulo (Timer Remaining Time MOD 60)

Problem:

The Timer looks like: 1:16.0 and 1:9.0

But i wanted: 1:16 and 1:09

Edit:

At the moment I can only think of writing a method which changes "9" to "09" and leaves "16" as "16" myself, via jass or gui.

But is there anything prescripted I could use?

Last edited: