HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trouble with Floating Text

07-26-2004, 09:31 PM#1
Milkman
I'm making a towerdefense and at the top of the map there's small boxes where you can see all the levels, each small box has a region inside it, for several reasons which doesn't have anything to do with this. Anyways, i want to create a number in theese regions, in region 1 i want the number 1, in 13 i want the number 13 and so on. So, i created this trigger but for some reason it won't work.
Code:
Init Text
    Events
        Map initialization
    Conditions
    Actions
        For each (Integer A) from 1 to 30, do (Actions)
            Loop - Actions
                Set temppoint = (Center of Level_Regions[(Integer A)])
                Floating Text - Create floating text that reads (String((Integer A))) at (temppoint with Z offset 0.00, using font size 10.00, color (50.00%, 100.00%, 50.00%), and 0.00% transparency
                Custom script: call RemoveLocation ( udg_temppoint)
                Custom script: set udg_temppoint=null

I'll appreicate any help.
07-27-2004, 04:41 AM#2
Mythmon
hmm, maybe try to remove the two custom script calls until after the loop will do it maybe RemoveLocation is actually making it so you can store anymore values in it.
07-27-2004, 07:24 PM#3
Xinlitik
Just a sidenote, floating text only lasts for like 100 seconds or something like that even if it isnt destroyed. It just dissapears after a while. So, for starts set them to a variable array and every 90 seconds or so delete them and replace them.

As for your question:

I made a trigger like yours and it worked fine for me *shrug*.
I dont know why yours wouldnt work.
Code:
Untitled Trigger 001
    Events
        Map initialization
    Conditions
    Actions
        Set Rect[1] = Rect 000 <gen>
        Set Rect[2] = Rect 002 <gen>
        Set Rect[3] = Rect 003 <gen>
        Set Rect[4] = Rect 001 <gen>
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                Set point = (Center of Rect[(Integer A)])
                Floating Text - Create floating text that reads (String((Integer A))) at point with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Custom script:   call RemoveLocation(udg_point)
07-27-2004, 08:11 PM#4
Milkman
Yes, i realized that some time after when i looked at it, it displayed the text correctly and it disappeared after some time, i had just missed it. I didn't know the time though. So I'll do a recreation trigger. Thanks.