• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Unit dont wanna Fly GUI/MUI

Status
Not open for further replies.
Level 10
Joined
Feb 20, 2008
Messages
448
Here im creating dummy unit in a circle(600 aoe)

i want to get fly height 1000 than reduce for 1 second while loop runthan 2 sec after the spell end

here the code i have i dont get it ; the unit have fly movement type o_O


  • Sabaku Taisou
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sabak Taisou
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SSCount[1] Equal to 0
        • Then - Actions
          • -------- if that value is zero then it means, there are no instances already running at the moment, so we now turn on the Tsukiomi Loop trigger --------
          • Trigger - Turn on Sabaku Taisou loop <gen>
        • Else - Actions
      • Set SSCount[1] = (SSCount[1] + 1)
      • Set SSCount[2] = (SSCount[2] + 1)
      • Set SSCheck[SSCount[2]] = 60
      • Set SSUnit[SSCount[2]] = (Casting unit)
      • Set SSReal[SSCount[2]] = (1.00 x ((Real((Level of (Ability being cast) for SSUnit[SSCount[2]]))) x (Real((Strength of SSUnit[SSCount[2]] (Exclude bonuses))))))
      • For each (Integer SSCount[3]) from 1 to SSCount[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • Set SS_Point[1] = (Target point of ability being cast)
              • Set SSPoint[1] = SS_Point[1]
              • Set SSGroup2[SSCount[3]] = (Units within 600.00 of SSPoint[1] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of SSUnit[SSCount[3]])) Equal to True)))
              • Environment - Create a 2.50 second wave deformation from SSPoint[1] to SSPoint[1] with radius 700.00, depth 96.00, and a 0.00 second trailing delay
              • Environment - Create a 2.50 second Normal ripple deformation at SSPoint[1] with starting radius 100.00, ending radius 700.00, and depth 64.00, using 1.00 second ripples spaced 512.00 apart
              • -------- This part below create unit to make the aoe spell evrything work --------
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 0.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 50.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 45.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 50.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 90.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 50.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 135.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 50.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 180.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 50.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 225.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 50.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 270.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 50.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 315.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 50.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 360.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 50.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 0.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 250.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 45.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 250.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 135.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 250.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 180.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 250.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 225.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 250.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 270.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 250.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 315.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 250.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 360.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 250.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 0.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 400.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 45.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 400.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 90.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 400.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 135.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 400.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 180.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 400.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 225.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 400.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 270.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 400.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 315.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 400.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • For each (Integer A) from 1 to 7, do (Actions)
                • Loop - Actions
                  • Set SSRealCircle[SSCount[3]] = 360.00
                  • Set SSPoint[2] = (SSPoint[1] offset by 400.00 towards SSRealCircle[SSCount[3]] degrees)
                  • Unit - Create 1 Dummy Sand for (Owner of SSUnit[SSCount[3]]) at SSPoint[2] facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to SSGroup[SSCount[3]]
              • Unit Group - Pick every unit in SSGroup[SSCount[3]] and do (Actions)
                • Loop - Actions
                  • Unit - Add Storm Crow Form to (Picked unit)
                  • Unit - Remove Storm Crow Form from (Picked unit)
                  • Animation - Change (Picked unit) flying height to 600.00 at 600.00
              • Custom script: call RemoveLocation(udg_SSPoint[1])
              • Custom script: call RemoveLocation(udg_SSPoint[2])
              • Custom script: call RemoveLocation(udg_SS_Point[1])
            • Else - Actions


  • Sabaku Taisou loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SSCount[3]) from 1 to SSCount[2], do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in SSGroup[SSCount[3]] and do (Actions)
            • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SSCheck[SSCount[3]] Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SSCheck[SSCount[3]] Equal to 25
                • Then - Actions
                  • Unit Group - Pick every unit in SSGroup2[SSCount[3]] and do (Actions)
                    • Loop - Actions
                      • Set SS_Point[2] = (Position of (Picked unit))
                      • Special Effect - Create a special effect at SS_Point[2] using SandExplosion.mdx
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect at SS_Point[2] using SandTrap.mdx
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation(udg_SS_Point[2])
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SSCheck[SSCount[3]] Equal to 58
                • Then - Actions
                  • Unit Group - Pick every unit in SSGroup2[SSCount[3]] and do (Actions)
                    • Loop - Actions
                      • Set SS_Point[2] = (Position of (Picked unit))
                      • Special Effect - Create a special effect at SS_Point[2] using SandExplosion.mdx
                      • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Create a special effect at SS_Point[2] using SandTrap.mdx
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation(udg_SS_Point[2])
                      • Unit - Cause SSUnit[SSCount[3]] to damage (Picked unit), dealing SSReal[SSCount[2]] damage of attack type Spells and damage type Normal
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SSHeight[SSCount[3]] Greater than 0.00
                • Then - Actions
                  • Unit Group - Pick every unit in SSGroup[SSCount[3]] and do (Actions)
                    • Loop - Actions
                      • Set SSHeight[SSCount[3]] = (Current flying height of (Picked unit))
                      • Animation - Change (Picked unit) flying height to (SSHeight[SSCount[3]] - 30.00) at 1000.00
                • Else - Actions
                  • Unit - Cause SSUnit[SSCount[3]] to damage (Picked unit), dealing SSReal[SSCount[3]] damage of attack type Spells and damage type Normal
              • Set SSCheck[SSCount[3]] = (SSCheck[SSCount[3]] - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SSCheck[SSCount[3]] Equal to 0
                • Then - Actions
                  • Unit Group - Pick every unit in SSGroup[SSCount[3]] and do (Unit - Remove (Picked unit) from the game)
                  • Set SSReal[SSCount[3]] = 0.00
                  • Set SSHeight[SSCount[3]] = 0.00
                  • Set SSRealCircle[SSCount[3]] = 0.00
                  • Set SSUnit[SSCount[3]] = No unit
                  • Set SSCount[1] = (SSCount[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SSCount[1] Equal to 0
                    • Then - Actions
                      • Set SSCount[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
 
Last edited:
Units have options in the object editor that are minimum and maximum flying height.. a unit cannot go higher than the maximum I think even if you use triggers... I'm not sure about this though... but maybe you can try setting the minimum to 0 and the max to 1000....

from my expirience units tend to fly on their minumum heights when you dont set their height using triggers...
 
Level 10
Joined
Feb 20, 2008
Messages
448
yah but i want it to appear all at same time, i didnt explore this way,

so x = height and y is the speed to take this height !!! good to know ill try and ill feedback

How could i make it shorter ?

edit my unit is based on peon, i might base it on another flying unit o_O

and nothing works even if i set height at 600 in object editor i cannot reduce it with their current height o_O
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
How could i make it shorter ?

Create a loop inside of a loop.

You have 26x from 1 to 7 seven do this and that.

You don't have to remove <target point of ability being cast> until at the very end. You set it again and again for nothing. You can increase the offset and angle inside a loop.

You have 26x basically the same thing, you only need one of those! One instead of 26. And that one has still too much things in it, like setting and removing the location over and over again.
 
Level 11
Joined
May 31, 2008
Messages
698
Unit - Add Storm Crow Form to (Picked unit)
Animation - Change (Picked unit) flying height to 1000.00 at 0.00
Unit - Remove Storm Crow Form from (Picked unit)

Also why do you do this
Set SS_Point[1] = (Target point of ability being cast)
Set SSPoint[1] = SS_Point[1]
It is pointless. Set SS_Point[1] = (Target point of ability being cast) do that at beginning of trigger and then remove the location at the very end of the trigger. I would imagine this creates massive lag because you are setting about 345234 locations at one time when you only need to set a couple

EDIT:

I just read the beginning of ur post and saw that u said the unit already has fly movement type. If this is so then you should probly remove the Add Storm Crow part.
 
Status
Not open for further replies.
Top