[Solved] How to change the Color of Timer?

Description: Internal scripting system of SMBX-38A Engine based on the simple VB-like language
Moderators: Lx Xzit, Yoshi021, 5438A38A, Semi-moderatos, Moderators

Pilzinsel64
Topic author, Count
Count
Pilzinsel64
Topic author, Count
Count
Reputation: 42
Posts: 226
Joined: 24 Jan 2016

Post #1by Pilzinsel64 » 24 Jul 2016, 11:51

How to change the Color of Timer, like this?

Image

Yave Yu M
Count
Count
Avatar
Yave Yu M
Count
Count
Age: 27
Reputation: 50
Posts: 242
Joined: 25 Jan 2016

Post #2by Yave Yu » 24 Jul 2016, 12:35

Write lvlTimer(color)=(Integer number here) in a script.
To get the color number, calculate it.
number=alpha*256*256*256+red*256*256+green*256+blue

Pilzinsel64
Topic author, Count
Count
Pilzinsel64
Topic author, Count
Count
Reputation: 42
Posts: 226
Joined: 24 Jan 2016

Post #3by Pilzinsel64 » 24 Jul 2016, 20:15

y479021776 wrote:Write lvlTimer(color)=(Integer number here) in a script.
To get the color number, calculate it.
number=alpha*256*256*256+red*256*256+green*256+blue

I used lvlTimer(color) = 255 * 256 * 256 * 256 + 0 * 256 * 256 + 20 * 256 * 120,
but the timernumber is still white.

Yave Yu M
Count
Count
Avatar
Yave Yu M
Count
Count
Age: 27
Reputation: 50
Posts: 242
Joined: 25 Jan 2016

Post #4by Yave Yu » 25 Jul 2016, 2:27

Pilzinsel64 wrote:I used lvlTimer(color) = 255 * 256 * 256 * 256 + 0 * 256 * 256 + 20 * 256 * 120,
but the timernumber is still white.
The last must be +120 not *120 because it's +blue. Also, write result number may effective.

Pilzinsel64
Topic author, Count
Count
Pilzinsel64
Topic author, Count
Count
Reputation: 42
Posts: 226
Joined: 24 Jan 2016

Post #5by Pilzinsel64 » 25 Jul 2016, 16:54

y479021776 wrote:
Pilzinsel64 wrote:I used lvlTimer(color) = 255 * 256 * 256 * 256 + 0 * 256 * 256 + 20 * 256 * 120,
but the timernumber is still white.
The last must be +120 not *120 because it's +blue. Also, write result number may effective.

Oh... thanks. :unexpectedly:

Added after 3 minutes 36 seconds:
I tested it, but the Timer is still white:
lvlTimer(color) = 255 * 256 * 256 * 256 + 0 * 256 * 256 + 20 * 256 + 120

Yave Yu M
Count
Count
Avatar
Yave Yu M
Count
Count
Age: 27
Reputation: 50
Posts: 242
Joined: 25 Jan 2016

Post #6by Yave Yu » 26 Jul 2016, 14:52

Pilzinsel64 wrote:I tested it, but the Timer is still white:
lvlTimer(color) = 255 * 256 * 256 * 256 + 0 * 256 * 256 + 20 * 256 + 120
Ah... you may try this, it can calculate that number out. ↓
SMBXCC.zip
(72.81 KiB) Downloaded 534 times

Pilzinsel64
Topic author, Count
Count
Pilzinsel64
Topic author, Count
Count
Reputation: 42
Posts: 226
Joined: 24 Jan 2016

Post #7by Pilzinsel64 » 26 Jul 2016, 15:06

y479021776 wrote:
Pilzinsel64 wrote:I tested it, but the Timer is still white:
lvlTimer(color) = 255 * 256 * 256 * 256 + 0 * 256 * 256 + 20 * 256 + 120
Ah... you may try this, it can calculate that number out. ↓
SMBXCC.zip

Thanks! IT works becautiful. And the tool looks realy nice! Thanks.

But a qestion do i have anyway:
If i calculate it (255 * 256 * 256 * 256 + 0 * 256 * 256 + 20 * 256 + 120) manually then the number is 4278195320,
but if i create the color with your tool, then the number is -16771841. Why?

Yave Yu M
Count
Count
Avatar
Yave Yu M
Count
Count
Age: 27
Reputation: 50
Posts: 242
Joined: 25 Jan 2016

Post #8by Yave Yu » 26 Jul 2016, 19:00

Pilzinsel64 wrote:
Thanks! IT works becautiful. And the tool looks realy nice! Thanks.

But a qestion do i have anyway:
If i calculate it (255 * 256 * 256 * 256 + 0 * 256 * 256 + 20 * 256 + 120) manually then the number is 4278195320,
but if i create the color with your tool, then the number is -16771841. Why?
Because range of integer number is -2147483648~2147483647, if a number beyond 2147483647 then it will start from -2147483648.


Return to “TeaScript”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest