Floating Text not appearing

Sil3nt

SUP?
Reaction score
134
Been stuck with this problem for a while now. I've remade the code several times and it's still not working as intended.

Code:
Floating Text  Mode
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Unit - Hide mode_circles[1]
        Unit - Hide mode_circles[2]
        Unit - Hide mode_circles[3]
        Unit - Hide mode_circles[4]
        Unit - Hide mode_circles[5]
        Set floating_text_pos[0] = ((Position of mode_circles[1]) offset by (0.00, 0.00))
        Set floating_text_pos[4] = ((Position of mode_circles[1]) offset by (600.00, 0.00))
        Set floating_text_pos[8] = ((Position of mode_circles[1]) offset by (1200.00, 0.00))
        Set floating_text_pos[14] = ((Position of mode_circles[1]) offset by (1800.00, 0.00))
        Floating Text - Create floating text that reads |c00eedc2dDraft Mod... at floating_text_pos[0] with Z offset 0.00, using font size 11.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Floating Text - Create floating text that reads |c00eedc2dDifficult... at floating_text_pos[4] with Z offset 0.00, using font size 11.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Floating Text - Create floating text that reads |c00eedc2dModificat... at floating_text_pos[8] with Z offset 0.00, using font size 11.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Floating Text - Create floating text that reads |c00eedc2dTower Mod... at floating_text_pos[14] with Z offset 0.00, using font size 11.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        For each (Integer A) from 1 to 3, do (Actions)
            Loop - Actions
                Set floating_text_pos[(Integer A)] = ((Position of mode_circles[(Integer A)]) offset by (0.00, -100.00))
                Floating Text - Create floating text that reads string_mode_draft[(Integer A)] at floating_text_pos[(Integer A)] with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Floating Text - Show (Last created floating text) for (All players)
        For each (Integer A) from 5 to 7, do (Actions)
            Loop - Actions
                Set floating_text_pos[(Integer A)] = ((Position of mode_circles[(Integer A)]) offset by (600.00, -100.00))
                Floating Text - Create floating text that reads string_mode_difficulty[(Integer A)] at floating_text_pos[(Integer A)] with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Floating Text - Show (Last created floating text) for (All players)
        For each (Integer A) from 8 to 13, do (Actions)
            Loop - Actions
                Set floating_text_pos[(Integer A)] = ((Position of mode_circles[(Integer A)]) offset by (1200.00, -100.00))
                Floating Text - Create floating text that reads string_mode_modifications[(Integer A)] at floating_text_pos[(Integer A)] with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Floating Text - Show (Last created floating text) for (All players)
        For each (Integer A) from 8 to 13, do (Actions)
            Loop - Actions
                Set floating_text_pos[(Integer A)] = ((Position of mode_circles[(Integer A)]) offset by (1800.00, -100.00))
                Floating Text - Create floating text that reads string_mode_tower[(Integer A)] at floating_text_pos[(Integer A)] with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Floating Text - Show (Last created floating text) for (All players)

My strings aren't empty, I checked. Basically I'm trying to get 4 columns that display the types of modes available but only the first column works. The problem must be with the loops/text positions - no idea.

Here's an image that might help explain what I'm trying to achieve better:

WC3ScrnShot_012812_024716_01.jpg
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
How many of those points:
Code:
Position of mode_circles[X]
are set?
You would need at least Position of mode_circles[1] -> Position of mode_circles[13] with your current script.

You are also leaking some points there:
Code:
For each (Integer A) [COLOR="#FF0000"]from 8 to 13[/COLOR], do (Actions)
     Loop - Actions
        [COLOR="#FF0000"]Set floating_text_pos[(Integer A)] [/COLOR]= ((Position of mode_circles[(Integer A)]) offset by (1200.00, -100.00))
        Floating Text - Create floating text that reads string_mode_modifications[(Integer A)] at floating_text_pos[(Integer A)] with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Floating Text - Show (Last created floating text) for (All players)
For each (Integer A) [COLOR="#FF0000"]from 8 to 13[/COLOR], do (Actions)
      Loop - Actions
        [COLOR="#FF0000"]Set floating_text_pos[(Integer A)] [/COLOR]= ((Position of mode_circles[(Integer A)]) offset by (1800.00, -100.00))
 

Sil3nt

SUP?
Reaction score
134
I've got this in a map init trigger:

Code:
Init
    Events
        Map initialization
    Conditions
    Actions
        -------- DEFINE MODE TEXT --------
        Set mode_circles[1] = Mode Marker 0021 <gen>
        Set mode_circles[2] = Mode Marker 0023 <gen>
        Set mode_circles[3] = Mode Marker 0024 <gen>
        Set mode_circles[4] = Mode Marker 0026 <gen>
        Set mode_circles[5] = Mode Marker 0027 <gen>

I think I see the problem now, though. Thanks a lot!
 

Sil3nt

SUP?
Reaction score
134
Oooook, guess I didn't figure it out.

Code:
Floating Text  Mode
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Unit - Hide mode_circles[1]
        Unit - Hide mode_circles[2]
        Unit - Hide mode_circles[3]
        Unit - Hide mode_circles[4]
        Unit - Hide mode_circles[5]
        Set floating_text_pos[0] = ((Position of mode_circles[1]) offset by (0.00, 0.00))
        Set floating_text_pos[1] = ((Position of mode_circles[2]) offset by (0.00, 0.00))
        Set floating_text_pos[2] = ((Position of mode_circles[3]) offset by (0.00, 0.00))
        Set floating_text_pos[3] = ((Position of mode_circles[4]) offset by (0.00, 0.00))
        Set floating_text_pos[4] = ((Position of mode_circles[1]) offset by (600.00, 0.00))
        Set floating_text_pos[5] = ((Position of mode_circles[2]) offset by (600.00, 0.00))
        Set floating_text_pos[6] = ((Position of mode_circles[3]) offset by (600.00, 0.00))
        Set floating_text_pos[7] = ((Position of mode_circles[4]) offset by (600.00, 0.00))
        For each (Integer A) from 1 to 3, do (Actions)
            Loop - Actions
                Floating Text - Create floating text that reads string_mode_draft[(Integer A)] at floating_text_pos[(Integer A)] with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Floating Text - Show (Last created floating text) for (All players)
        For each (Integer A) from 5 to 7, do (Actions)
            Loop - Actions
                For each (Integer B) from 1 to 3, do (Actions)
                    Loop - Actions
                        Floating Text - Create floating text that reads string_mode_difficulty[(Integer A)] at floating_text_pos[(Integer B)] with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                        Floating Text - Show (Last created floating text) for (All players)
        Set floating_text_pos[8] = ((Position of mode_circles[1]) offset by (1200.00, 0.00))
        Set floating_text_pos[14] = ((Position of mode_circles[1]) offset by (1800.00, 0.00))
        Floating Text - Create floating text that reads |c00eedc2dDraft Mod... at floating_text_pos[0] with Z offset 0.00, using font size 11.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Floating Text - Create floating text that reads |c00eedc2dDifficult... at floating_text_pos[4] with Z offset 0.00, using font size 11.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Floating Text - Create floating text that reads |c00eedc2dModificat... at floating_text_pos[8] with Z offset 0.00, using font size 11.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Floating Text - Create floating text that reads |c00eedc2dTower Mod... at floating_text_pos[14] with Z offset 0.00, using font size 11.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency

Code at the moment is supposed to display 2 columns, still only one. Not worried about leaks right now.

You would need at least Position of mode_circles[1] -> Position of mode_circles[13] with your current script.

There are only 5 circles going down vertically , not a grid of them.
 

Sil3nt

SUP?
Reaction score
134
I basically redid the code without the loops and now it works fine. I've got another little problem though, which is destroying all of the floating texts when the game begins. Problem is I can't find any way to select all the floating texts and destroy them. Couldn't find anything in search, either.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
you can create an expiration timer for them (lifespan) that expires when they should be destroyed
 

Sil3nt

SUP?
Reaction score
134
I take it I'll have to store them each into an array, and that there's no way to simply select them all and expire them at once?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top