• 🏆 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!

[Solved] Help pls with a MUI Trigger

Status
Not open for further replies.
Level 1
Joined
Apr 3, 2018
Messages
5
I tried but it dosent work, where i'm wrong

  • Morph
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Metamorphosis
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Index Equal to 0
        • Then - Actions
          • Trigger - Turn on Morph Loop <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) is in Morph_Group) Equal to False
        • Then - Actions
          • Set Index = (Index + 1)
          • Set MUI = (MUI + 1)
          • Set Morph_Caster[MUI] = (Casting unit)
          • Set Str[MUI] = ((Strength of Morph_Caster[MUI] (Exclude bonuses)) / 2)
          • Set Agi[MUI] = ((Agility of Morph_Caster[MUI] (Exclude bonuses)) / 2)
          • Set Int[MUI] = ((Intelligence of Morph_Caster[MUI] (Exclude bonuses)) / 2)
          • Unit Group - Add Morph_Caster[MUI] to Morph_Group
          • Hero - Modify Strength of Morph_Caster[MUI]: Add Str[MUI]
          • Hero - Modify Agility of Morph_Caster[MUI]: Add Agi[MUI]
          • Hero - Modify Intelligence of Morph_Caster[MUI]: Add Int[MUI]
          • Set Timer[MUI] = 200
        • Else - Actions
  • Morph Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer loop) from 1 to MUI, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Timer[loop] Greater than 0
            • Then - Actions
              • Set Timer[loop] = (Timer[loop] - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Morph_Caster[loop] has buff Morph ) Equal to True
                • Then - Actions
                • Else - Actions
                  • Set Index = (Index - 1)
                  • Hero - Modify Strength of Morph_Caster[loop]: Subtract Str[loop]
                  • Hero - Modify Agility of Morph_Caster[loop]: Subtract Agi[loop]
                  • Hero - Modify Intelligence of Morph_Caster[loop]: Subtract Int[loop]
                  • Unit Group - Remove Morph_Caster[loop] from Morph_Group
                  • Set Morph_Caster[loop] = No unit
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Index Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                      • Set MUI = 0
                    • Else - Actions
 
Level 1
Joined
Apr 3, 2018
Messages
5
That Work! Thank you!!!!
  • Morph Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer loop) from 1 to MUI, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Timer[loop] Greater than 0
            • Then - Actions
              • Set Timer[loop] = (Timer[loop] - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Morph_Caster[loop] has buff Morph ) Equal to True
                • Then - Actions
                • Else - Actions
                  • Set Index = (Index - 1)
                  • Hero - Modify Strength of Morph_Caster[loop]: Subtract Str[loop]
                  • Hero - Modify Agility of Morph_Caster[loop]: Subtract Agi[loop]
                  • Hero - Modify Intelligence of Morph_Caster[loop]: Subtract Int[loop]
                  • Unit Group - Remove Morph_Caster[loop] from Morph_Group
                  • Set Morph_Caster[loop] = No unit
                  • Set Morph_Caster[loop] = Morph_Caster[MUI]
                  • Set Str[loop] = Str[MUI]
                  • Set Agi[loop] = Agi[MUI]
                  • Set Int[loop] = Int[MUI]
                  • Set Timer[loop] = Timer[MUI]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Index Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                      • Set MUI = 0
 
Level 1
Joined
Apr 3, 2018
Messages
5
  • Morph Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer loop) from 1 to MUI, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Timer[loop] Greater than 0
            • Then - Actions
              • Set Timer[loop] = (Timer[loop] - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Morph_Caster[loop] has buff Morph ) Equal to True
                • Then - Actions
                • Else - Actions
                  • Hero - Modify Strength of Morph_Caster[loop]: Subtract Str[loop]
                  • Hero - Modify Agility of Morph_Caster[loop]: Subtract Agi[loop]
                  • Hero - Modify Intelligence of Morph_Caster[loop]: Subtract Int[loop]
                  • Unit Group - Remove Morph_Caster[loop] from Morph_Group
                  • Set Morph_Caster[loop] = No unit
                  • Set Morph_Caster[loop] = Morph_Caster[MUI]
                  • Set Str[loop] = Str[MUI]
                  • Set Agi[loop] = Agi[MUI]
                  • Set Int[loop] = Int[MUI]
                  • Set Timer[loop] = Timer[MUI]
                  • Set loop = (loop - 1)
                  • Set MUI = (MUI - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MUI Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
that is right?
 
Level 1
Joined
Apr 3, 2018
Messages
5
What does the cast trigger look like? Also, you don't need Morph_Caster[loop] = No unit
Ok Thank you! its done
  • Morph
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Metamorphosis
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI Equal to 0
        • Then - Actions
          • Trigger - Turn on Morph Loop <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) is in Morph_Group) Equal to False
        • Then - Actions
          • Set MUI = (MUI + 1)
          • Set Morph_Caster[MUI] = (Casting unit)
          • Set Str[MUI] = ((Strength of Morph_Caster[MUI] (Exclude bonuses)) / 2)
          • Set Agi[MUI] = ((Agility of Morph_Caster[MUI] (Exclude bonuses)) / 2)
          • Set Int[MUI] = ((Intelligence of Morph_Caster[MUI] (Exclude bonuses)) / 2)
          • Unit Group - Add Morph_Caster[MUI] to Morph_Group
          • Hero - Modify Strength of Morph_Caster[MUI]: Add Str[MUI]
          • Hero - Modify Agility of Morph_Caster[MUI]: Add Agi[MUI]
          • Hero - Modify Intelligence of Morph_Caster[MUI]: Add Int[MUI]
          • Set Timer[MUI] = 200
        • Else - Actions
  • Morph Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer loop) from 1 to MUI, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Timer[loop] Greater than 0
            • Then - Actions
              • Set Timer[loop] = (Timer[loop] - 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of Morph_Caster[loop]) Equal to Demon Hunter (Demon Form)
                • Then - Actions
                • Else - Actions
                  • Hero - Modify Strength of Morph_Caster[loop]: Subtract Str[loop]
                  • Hero - Modify Agility of Morph_Caster[loop]: Subtract Agi[loop]
                  • Hero - Modify Intelligence of Morph_Caster[loop]: Subtract Int[loop]
                  • Unit Group - Remove Morph_Caster[loop] from Morph_Group
                  • Set Morph_Caster[loop] = Morph_Caster[MUI]
                  • Set Str[loop] = Str[MUI]
                  • Set Agi[loop] = Agi[MUI]
                  • Set Int[loop] = Int[MUI]
                  • Set Timer[loop] = Timer[MUI]
                  • Set loop = (loop - 1)
                  • Set MUI = (MUI - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MUI Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
 
Status
Not open for further replies.
Top