- Joined
- Aug 20, 2012
- Messages
- 36
Problem with a loop (updated
What I want to do is to make my damage displaying floating text to smoothly decrease it's size from 15 to 10, my trigger only works for the first few floating texts, then it stops working and all of the new floating texts stay at size 15.
Here are my triggers:
What I want to do is to make my damage displaying floating text to smoothly decrease it's size from 15 to 10, my trigger only works for the first few floating texts, then it stops working and all of the new floating texts stay at size 15.
Here are my triggers:
-
Dmg Float Run 1
-
Events
- Game - GDD_Event becomes Equal to 0.00
-
Conditions
- (GDD_DamageSource belongs to an ally of Player 1 (Red)) Equal to True
- (GDD_DamageSource is Summoned) Equal to False
- (Integer(GDD_Damage)) Not equal to 0
-
Actions
- Set Float_DMGTimes = (Float_DMGTimes + 1)
- Set Float_DMG[Float_DMGTimes] = (Integer(GDD_Damage))
- Floating Text - Create floating text that reads (String(Float_DMG[Float_DMGTimes])) at (Random point in (Region centered at (Position of GDD_DamagedUnit) with size (50.00, 0.00))) with Z offset 40.00, using font size 15.00, color (80.00%, 80.00%, 80.00%), and 0.00% transparency
- Set Float_DMGSize[Float_DMGTimes] = 15.00
- Set Float_DMGFloatingText[Float_DMGTimes] = (Last created floating text)
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Set the velocity of (Last created floating text) to 75.00 towards 90.00 degrees
- Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
- Floating Text - Change the fading age of (Last created floating text) to 2.50 seconds
- Trigger - Turn on Dmg Float Loop <gen>
-
Events
-
Dmg Float Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer Float_DMGLoop) from 1 to Float_DMGTimes, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Float_DMGSize[Float_DMGLoop] Greater than or equal to 10.00
-
Then - Actions
- Set Float_DMGSize[Float_DMGLoop] = (Float_DMGSize[Float_DMGLoop] - 0.50)
- Floating Text - Change text of Float_DMGFloatingText[Float_DMGLoop] to (String(Float_DMG[Float_DMGLoop])) using font size Float_DMGSize[Float_DMGLoop]
-
Else - Actions
- Trigger - Turn off (This trigger)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer Float_DMGLoop) from 1 to Float_DMGTimes, do (Actions)
-
Events
Last edited: