• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Selection Circle Height

Status
Not open for further replies.
I have a system that adjusts the flying height of a unit gradually since I can't use the normal way by just setting height to X and rate to Y for various reasons. The problem I have is that is doesn't appear to change the unit's selection circle along with the height whenever the height increases. Any ideas?

  • Height Adjustment
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Height_group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Set ID = (Custom value of (Picked unit))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Height_goingUp[ID] Equal to True
                • Then - Actions
                  • Set Height_adjustment = ((Current flying height of (Picked unit)) + (Height_speed[ID] / 33.00))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Height_adjustment Greater than or equal to Height_newHeight[ID]
                    • Then - Actions
                      • Set Height_adjustment = Height_newHeight[ID]
                      • Animation - Change (Picked unit) flying height to Height_adjustment at 0.00
                      • Unit Group - Remove (Picked unit) from Height_group
                    • Else - Actions
                      • Animation - Change (Picked unit) flying height to Height_adjustment at 0.00
                • Else - Actions
                  • Set Height_adjustment = ((Current flying height of (Picked unit)) - (Height_speed[ID] / 33.00))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Height_adjustment Less than or equal to Height_newHeight[ID]
                    • Then - Actions
                      • Set Height_adjustment = Height_newHeight[ID]
                      • Animation - Change (Picked unit) flying height to Height_adjustment at 0.00
                      • Unit Group - Remove (Picked unit) from Height_group
                    • Else - Actions
                      • Animation - Change (Picked unit) flying height to Height_adjustment at 0.00
            • Else - Actions
              • Unit Group - Remove (Picked unit) from Height_group
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Height_group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
 

sentrywiz

S

sentrywiz

Clarify: the selection circle doesn't get bigger or it stays on the ground and it doesn't follow the unit in the air?
 

sentrywiz

S

sentrywiz

Does the unit have fly / hover as movetype?

Try adding and removing the crow ability to the unit since it stops glitches and bugs related to increasing or decreasing height of a ground unit. that might also work for selection circle.
 
Yes, the unit has fly as it's movetype. Adding/removing Storm Crow did not help, sadly. I even tried with GYU AutoFly, but still nothing.

Interestingly enough, setting the selection circle height to 0 in the data editor constrains it to ground level.

EDIT: Okay for some weird reason, the circle sometimes goes up when the flying height increases. It's almost as if the circle can't go higher than the default height it was initially set as.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
the movement type the selection circle uses is most likely based on the actual unit data, so even if you add and remove storm crow ability and set units' height, the selection circle will stay on the ground. Same goes for unit's size. I think there actually are fields for the size, maybe for the height too(There for sure is selection size, but dont know if that is editor only, or also inside game)
 
Status
Not open for further replies.
Top