- Joined
- Jul 6, 2009
- Messages
- 1,885
I've got a problem while i was making a custom unit leveling system.
Here's thread that's describing it: https://www.hiveworkshop.com/forums/requests-341/unit-level-system-157818/
The problem is that some levels aren't shown,for example,when unit gains 2nd level, "II" appears above it and disappears immediately after. Also i tried to set that event occurs every second and i've noticed that even levels aren't shown,such as 2nd,4th,6th etc...why is that?
+rep for help!
Here's thread that's describing it: https://www.hiveworkshop.com/forums/requests-341/unit-level-system-157818/
The problem is that some levels aren't shown,for example,when unit gains 2nd level, "II" appears above it and disappears immediately after. Also i tried to set that event occurs every second and i've noticed that even levels aren't shown,such as 2nd,4th,6th etc...why is that?
+rep for help!
-
Floating Text Appearing
-

Event
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


Set Text_Group = (Units in (Playable map area))
-


Unit Group - Pick every unit in Text_Group and do (Actions)
-



Loop - Actions
-




Floating Text - Destroy (Load 1 of (Key (Picked unit)) in Level_HashIf the label is not found, this function returns NULL.)
-
-
-


Custom script: call DestroyGroup(udg_Text_Group)
-


Player Group - Pick every player in (All players) and do (Actions)
-



Loop - Actions
-




Custom script: if GetLocalPlayer() == GetEnumPlayer() then
-




Set Camera_Point = (Target of current camera view)
-




Custom script: endif
-




Set Text_Group = (Units within 800.00 of Camera_Point matching ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to Player 1 (Red))))
-




Unit Group - Pick every unit in Text_Group and do (Actions)
-





Loop - Actions
-






Set Temp_Point1 = (Position of (Picked unit))
-






Set Temp_Point2 = (Temp_Point1 offset by (20.00, 50.00))
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Load 0 of (Key (Picked unit)) from Level_Hash) Less than 4
-
-







Then - Actions
-








Floating Text - Create floating text that reads I at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-








Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Load 0 of (Key (Picked unit)) from Level_Hash) Equal to 4
-
-









Then - Actions
-










Floating Text - Create floating text that reads II at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-










Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-









Else - Actions
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












(Load 0 of (Key (Picked unit)) from Level_Hash) Equal to 7
-
-











Then - Actions
-












Floating Text - Create floating text that reads III at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-












Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-











Else - Actions
-












If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-













If - Conditions
-














(Load 0 of (Key (Picked unit)) from Level_Hash) Equal to 11
-
-













Then - Actions
-














Floating Text - Create floating text that reads IV at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-














Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-













Else - Actions
-














If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-















If - Conditions
-
















(Load 0 of (Key (Picked unit)) from Level_Hash) Equal to 16
-
-















Then - Actions
-
















Floating Text - Create floating text that reads V at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-
















Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-















Else - Actions
-
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-

















If - Conditions
-


















(Load 0 of (Key (Picked unit)) from Level_Hash) Equal to 22
-
-

















Then - Actions
-


















Floating Text - Create floating text that reads VI at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-


















Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-

















Else - Actions
-


















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



















If - Conditions
-




















(Load 0 of (Key (Picked unit)) from Level_Hash) Equal to 29
-
-



















Then - Actions
-




















Floating Text - Create floating text that reads VII at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-




















Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-



















Else - Actions
-




















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





















If - Conditions
-






















(Load 0 of (Key (Picked unit)) from Level_Hash) Equal to 37
-
-





















Then - Actions
-






















Floating Text - Create floating text that reads VIII at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-






















Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-





















Else - Actions
-






















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-























If - Conditions
-
























(Load 0 of (Key (Picked unit)) from Level_Hash) Equal to 46
-
-























Then - Actions
-
























Floating Text - Create floating text that reads IX at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-
























Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-























Else - Actions
-
























If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-

























If - Conditions
-


























(Load 0 of (Key (Picked unit)) from Level_Hash) Equal to 56
-
-

























Then - Actions
-


























Floating Text - Create floating text that reads X at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-


























Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-

























Else - Actions
-


























If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



























If - Conditions
-




























(Load 0 of (Key (Picked unit)) from Level_Hash) Equal to 67
-
-



























Then - Actions
-




























Floating Text - Create floating text that reads XI at Temp_Point2 with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 1.00%), and 0.00% transparency
-




























Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Level_Hash
-
-



























Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-






Custom script: call RemoveLocation(udg_Temp_Point1)
-






Custom script: call RemoveLocation(udg_Temp_Point2)
-
-
-




Custom script: call DestroyGroup(udg_Text_Group)
-




Set Text_Group = (Units in (Playable map area))
-




Unit Group - Pick every unit in Text_Group and do (Actions)
-





Loop - Actions
-






Floating Text - Hide (Load 1 of (Key (Picked unit)) in Level_HashIf the label is not found, this function returns NULL.) for (All players matching (((Picked unit) is fogged to (Picked player)) Equal to True))
-
-
-




Custom script: call DestroyGroup(udg_Text_Group)
-
-
-
-
















