• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help me fix my floating text countdown

Status
Not open for further replies.
Level 6
Joined
Feb 10, 2011
Messages
188
Ok, so i made a floating text countdown and it only had one problem before clearing leaks. Thread can be found here: http://www.hiveworkshop.com/forums/world-editor-help-zone-98/question-about-floating-text-dialogs-240770/#post2413148
Though this is not the reason for the thread.

The reason for this thread is as follows:
I started to clear the leaks in my system, after clearing the leaks in the first trigger, It stopped working correctly. What happens is the
Voting Begins in: (seconds here) seconds!
floating text appears, but the numbers no longer do. (the countdown still works as intended though)
Second, when the voting begin countdowns ends, it should delete the voting begins in: and the seconds! ftext (which it does) and it should create texts in the same spots that says
Voting ends in: (seconds here) seconds!
but it does not, and once again the countdown still works, you just no longer see the floating text.

here are the original triggers that worked
  • Create Floating Text
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads Risk Ages at ((Center of START <gen>) offset by (-570.00, 150.00)) with Z offset 0.00, using font size 16.00, color (70.00%, 100.00%, 40.00%), and 0.00% transparency
      • Set tempText1 = (Last created floating text)
      • Floating Text - Create floating text that reads was created by: at ((Center of START <gen>) offset by (-540.00, 100.00)) with Z offset 0.00, using font size 10.00, color (60.00%, 40.00%, 100.00%), and 0.00% transparency
      • Set tempText2 = (Last created floating text)
      • Floating Text - Create floating text that reads RiskYourUnits at ((Center of START <gen>) offset by (-510.00, 50.00)) with Z offset 0.00, using font size 12.00, color (30.00%, 75.00%, 69.00%), and 0.00% transparency
      • Set tempText3 = (Last created floating text)
      • Floating Text - Create floating text that reads Special Thanks to: at ((Center of START <gen>) offset by (-480.00, -35.00)) with Z offset 0.00, using font size 13.00, color (30.00%, 75.00%, 69.00%), and 0.00% transparency
      • Set tempText4 = (Last created floating text)
      • Floating Text - Create floating text that reads Priwin / Goble-R1sk... at ((Center of START <gen>) offset by (-450.00, -70.00)) with Z offset 0.00, using font size 11.00, color (0.00%, 100.00%, 85.00%), and 0.00% transparency
      • Set tempText5 = (Last created floating text)
      • Floating Text - Create floating text that reads |cffff0000Voting be... at ((Center of START <gen>) offset by (-600.00, -225.00)) with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText6 = (Last created floating text)
      • Floating Text - Create floating text that reads |cffff0000seconds!|... at ((Center of START <gen>) offset by (-120.00, -225.00)) with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText7 = (Last created floating text)
      • Floating Text - Create floating text that reads at ((Center of START <gen>) offset by (-120.00, -225.00)) with Z offset 0.00, using font size 1.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText8 = (Last created floating text)
      • For each (Integer O) from 1 to 12, do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Player(O)) emitting Visibility across START <gen>
          • Set tempVis = (Last created visibility modifier)
          • Camera - Set (Player(O))'s camera CAMERA_FIELD_TARGET_DISTANCE to 2000.00 over 0.00 seconds
          • Camera - Set (Player(O))'s camera Angle of attack to -90.00 over 0.00 seconds
          • Camera - Set the camera bounds for (Player(O)) to CAM BOUND <gen>
          • Camera - Shrink the camera bounds for (Player(O)) west by 150.00, east by 150.00, north by 150.00, and south by 150.00
      • Set VOTESECONDS = 5
      • Trigger - Turn on Start Countdown <gen>
  • Start Countdown
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Floating Text - Destroy tempText8
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VOTESECONDS Greater than 0
        • Then - Actions
          • Floating Text - Create floating text that reads (|cffff0000 + ((String(VOTESECONDS)) + |r)) at ((Center of START <gen>) offset by (-170.00, -225.00)) with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
          • Set VOTESECONDS = (VOTESECONDS - 1)
        • Else - Actions
          • Floating Text - Destroy tempText6
          • Floating Text - Destroy tempText7
          • Trigger - Turn off Start Countdown <gen>
          • Set VOTESECONDS = 30
          • Trigger - Run Create Mode Timer <gen> (checking conditions)
          • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
  • Create Mode Timer
    • Events
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads |cffff0000Voting en... at ((Center of START <gen>) offset by (-600.00, -225.00)) with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText6 = (Last created floating text)
      • Floating Text - Create floating text that reads |cffff0000seconds!|... at ((Center of START <gen>) offset by (-150.00, -225.00)) with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText7 = (Last created floating text)
      • Floating Text - Create floating text that reads at ((Center of START <gen>) offset by (-120.00, -225.00)) with Z offset 0.00, using font size 1.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText8 = (Last created floating text)
      • Trigger - Turn on Vote Countdown <gen>
      • Trigger - Run Create Fog Vote <gen> (checking conditions)
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
  • Vote Countdown
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Floating Text - Destroy tempText8
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VOTESECONDS Greater than 0
        • Then - Actions
          • Floating Text - Create floating text that reads (|cffff0000 + ((String(VOTESECONDS)) + |r)) at ((Center of START <gen>) offset by (-225.00, -225.00)) with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
          • Set VOTESECONDS = (VOTESECONDS - 1)
        • Else - Actions
          • Visibility - Destroy tempVis
          • For each (Integer O) from 1 to 12, do (Actions)
            • Loop - Actions
              • Camera - Set the camera bounds for (Player(O)) to (Initial camera bounds)
              • Camera - Set (Player(O))'s camera CAMERA_FIELD_TARGET_DISTANCE to 2900.00 over 0.00 seconds
              • Camera - Set (Player(O))'s camera Angle of attack to -60.00 over 0.00 seconds
          • Floating Text - Destroy tempText1
          • Floating Text - Destroy tempText2
          • Floating Text - Destroy tempText3
          • Floating Text - Destroy tempText4
          • Floating Text - Destroy tempText5
          • Floating Text - Destroy tempText6
          • Floating Text - Destroy tempText7
          • Trigger - Run Fog Mode <gen> (checking conditions)
          • Trigger - Turn off Vote Countdown <gen>
          • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
here is the triggers after i cleaned the leaks from the first trigger. they no longer work correctly, as explained above

  • Create Floating Text
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • -------- Set Region --------
      • Set tempRect1 = START <gen>
      • Set tempPoint1 = (Center of tempRect1)
      • -------- Set Text --------
      • Set tempPoint2 = (tempPoint1 offset by (-570.00, 150.00))
      • Floating Text - Create floating text that reads Risk Ages at tempPoint2 with Z offset 0.00, using font size 16.00, color (70.00%, 100.00%, 40.00%), and 0.00% transparency
      • Set tempText1 = (Last created floating text)
      • -------- Set Text --------
      • Set tempPoint3 = (tempPoint1 offset by (-540.00, 100.00))
      • Floating Text - Create floating text that reads was created by: at tempPoint3 with Z offset 0.00, using font size 10.00, color (60.00%, 40.00%, 100.00%), and 0.00% transparency
      • Set tempText2 = (Last created floating text)
      • -------- Set Text --------
      • Set tempPoint4 = (tempPoint1 offset by (-510.00, 50.00))
      • Floating Text - Create floating text that reads RiskYourUnits at tempPoint4 with Z offset 0.00, using font size 12.00, color (30.00%, 75.00%, 69.00%), and 0.00% transparency
      • Set tempText3 = (Last created floating text)
      • -------- Set Text --------
      • Set tempPoint5 = (tempPoint1 offset by (-480.00, -35.00))
      • Floating Text - Create floating text that reads Special Thanks to: at tempPoint5 with Z offset 0.00, using font size 13.00, color (30.00%, 75.00%, 69.00%), and 0.00% transparency
      • Set tempText4 = (Last created floating text)
      • -------- Set Text --------
      • Set tempPoint6 = (tempPoint1 offset by (-450.00, -70.00))
      • Floating Text - Create floating text that reads Priwin / Goble-R1sk... at tempPoint6 with Z offset 0.00, using font size 11.00, color (0.00%, 100.00%, 85.00%), and 0.00% transparency
      • Set tempText5 = (Last created floating text)
      • -------- Set Text --------
      • Set tempPoint7 = (tempPoint1 offset by (-600.00, -225.00))
      • Floating Text - Create floating text that reads |cffff0000Voting be... at tempPoint7 with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText6 = (Last created floating text)
      • -------- Set Text --------
      • Set tempPoint8 = (tempPoint1 offset by (-120.00, -225.00))
      • Floating Text - Create floating text that reads |cffff0000seconds!|... at tempPoint8 with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText7 = (Last created floating text)
      • -------- Clear Leaks --------
      • Custom script: call RemoveLocation(udg_tempPoint1)
      • Custom script: call RemoveLocation(udg_tempPoint2)
      • Custom script: call RemoveLocation(udg_tempPoint3)
      • Custom script: call RemoveLocation(udg_tempPoint4)
      • Custom script: call RemoveLocation(udg_tempPoint5)
      • Custom script: call RemoveLocation(udg_tempPoint6)
      • Custom script: call RemoveLocation(udg_tempPoint7)
      • Custom script: call RemoveLocation(udg_tempPoint8)
      • Custom script: call RemoveRect(udg_tempRect1)
      • -------- Disable Fog --------
      • Visibility - Disable black mask
      • Visibility - Disable fog of war
      • -------- Set Camera --------
      • For each (Integer O) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set tempRect2 = CAM BOUND <gen>
          • Camera - Set (Player(O))'s camera CAMERA_FIELD_TARGET_DISTANCE to 2000.00 over 0.00 seconds
          • Camera - Set (Player(O))'s camera Angle of attack to -90.00 over 0.00 seconds
          • Camera - Set the camera bounds for (Player(O)) to tempRect2
          • Camera - Shrink the camera bounds for (Player(O)) west by 150.00, east by 150.00, north by 150.00, and south by 150.00
          • Custom script: call RemoveRect(udg_tempRect2)
      • Set VOTESECONDS = 5
      • Trigger - Turn on Start Countdown <gen>
  • Start Countdown
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- Set Region --------
      • Set tempRect1 = START <gen>
      • Set tempPoint1 = (Center of tempRect1)
      • Set tempPoint2 = (tempPoint1 offset by (-170.00, -225.00))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VOTESECONDS Greater than 0
        • Then - Actions
          • Floating Text - Create floating text that reads (|cffff0000 + ((String(VOTESECONDS)) + |r)) at tempPoint2 with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
          • Set VOTESECONDS = (VOTESECONDS - 1)
        • Else - Actions
          • Floating Text - Destroy tempText6
          • Floating Text - Destroy tempText7
          • Trigger - Turn off Start Countdown <gen>
          • Set VOTESECONDS = 30
          • Trigger - Run Create Mode Timer <gen> (checking conditions)
          • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
      • Custom script: call RemoveLocation(udg_tempPoint1)
      • Custom script: call RemoveLocation(udg_tempPoint2)
      • Custom script: call RemoveRect(udg_tempRect1)
  • Create Mode Timer
    • Events
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads |cffff0000Voting en... at ((Center of START <gen>) offset by (-600.00, -225.00)) with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText6 = (Last created floating text)
      • Floating Text - Create floating text that reads |cffff0000seconds!|... at ((Center of START <gen>) offset by (-150.00, -225.00)) with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText7 = (Last created floating text)
      • Floating Text - Create floating text that reads at ((Center of START <gen>) offset by (-120.00, -225.00)) with Z offset 0.00, using font size 1.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set tempText8 = (Last created floating text)
      • Trigger - Turn on Vote Countdown <gen>
      • Trigger - Run Create Fog Vote <gen> (checking conditions)
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
  • Vote Countdown
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Floating Text - Destroy tempText8
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VOTESECONDS Greater than 0
        • Then - Actions
          • Floating Text - Create floating text that reads (|cffff0000 + ((String(VOTESECONDS)) + |r)) at ((Center of START <gen>) offset by (-225.00, -225.00)) with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
          • Set VOTESECONDS = (VOTESECONDS - 1)
        • Else - Actions
          • For each (Integer O) from 1 to 12, do (Actions)
            • Loop - Actions
              • Camera - Set the camera bounds for (Player(O)) to (Initial camera bounds)
              • Camera - Set (Player(O))'s camera CAMERA_FIELD_TARGET_DISTANCE to 2900.00 over 0.00 seconds
              • Camera - Set (Player(O))'s camera Angle of attack to -60.00 over 0.00 seconds
          • Floating Text - Destroy tempText1
          • Floating Text - Destroy tempText2
          • Floating Text - Destroy tempText3
          • Floating Text - Destroy tempText4
          • Floating Text - Destroy tempText5
          • Floating Text - Destroy tempText6
          • Floating Text - Destroy tempText7
          • Trigger - Run Fog Mode <gen> (checking conditions)
          • Trigger - Run Ships Mode <gen> (checking conditions)
          • Trigger - Run Landing Mode <gen> (checking conditions)
          • Trigger - Run Start Game <gen> (checking conditions)
          • Trigger - Turn off Vote Countdown <gen>
          • Custom script: call DestroyTrigger( GetTriggeringTrigger() )

If my explanation is not clear enough, let me know i can add screen shots of the not working triggers, there is screen shots of the "working" triggers in the thread i linked.

If there is a better way of doing this, let me know.
 
Level 6
Joined
Feb 10, 2011
Messages
188
I have remade the triggers, they are alot better now and work properly, without leaks thank you, if you want to see them i will post them

I do have a new question, how do u change a units angle of attack, i want a ship that attacks sideways
 
Level 5
Joined
Aug 9, 2012
Messages
119
i think that cant be set like that, or maybe a powerful JASS languange have the command?
have u ever seen one?
 
Level 6
Joined
Feb 10, 2011
Messages
188
i think that cant be set like that, or maybe a powerful JASS languange have the command?
have u ever seen one?

no i havent but i figure anything is possible :)
hm ill have to look at some battleships maps see if they do it.
 
Status
Not open for further replies.
Top