Not being able to get HUDset objects

Description: Report bugs of SMBX-38A here.
Moderators: Lx Xzit, Yoshi021, 5438A38A, Moderators, Semi-moderatos

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 18
Reputation: 120
Posts: 667
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #1by Yoshi021 » 5 Sep 2017, 2:10

I noticed that the arguments for HIDset to make text and bitmaps there is an ID field. but Text() and Bitmap() are not able to get them.

For example:

Code: Select all

call HUDSet("text:A", 1, 0, 0, 28, 255, 10, 184, -1, -1)
Text(1).x = 100


does nothing. The position does not change to 100, instead, it stays at 0.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Catskart M
Count
Count
Avatar
Catskart M
Count
Count
Age: 19
Reputation: 140
Posts: 258
Joined: 29 Nov 2015
Location: France

Post #2by Catskart » 5 Sep 2017, 12:46

Because bitmaps and texts which are in the HUD aren't registred in bitmap(). and text().

But unlike bitmap and text, if you set two hudset with two same id, the last hudset will overwrite the first.
To example, you have two method for you position.

You can set two HUDset command of your text.

Code: Select all

call HUDSet("text:A", 1, 0, 0, 28, 255, 10, 184, -1, -1)
call HUDSet("text:A", 1, 100, 0, 28, 255, 10, 184, -1, -1)


OR
You can, set a loop in your Hud script like this :

Code: Select all

do
call HUDSet("text:A", 1, val(t1x), 0, 28, 255, 10, 184, -1, -1)
call sleep(1)
loop

Where val(t1x) is the x pos of the Text1.

Eri7 M
Count
Count
Avatar
Eri7 M
Count
Count
Age: 17
Reputation: 73
Posts: 259
Joined: 19 Dec 2016
Location: Germany , Bonn

Post #3by Eri7 » 5 Sep 2017, 14:31

Catskart saves the day!
Join the discord server about Nova Projects.
Image

I support:
Image

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 18
Reputation: 120
Posts: 667
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #4by Yoshi021 » 6 Sep 2017, 2:37

ah, ok. That makes sense.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:


Return to “Bug reports”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest