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

[Trigger] MUI casting bar bug

Status
Not open for further replies.
Level 2
Joined
May 9, 2012
Messages
19
Hi guys i'm still new on world editing i start like a month ago and i'm learning mui to create spells and systems like casting bar but my system has bug and i dont know how to fix it any help will be appriciated tho
  • Cast
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ChannelInteger[0] Equal to 0
        • Then - Actions
          • Trigger - Turn on Loop <gen>
        • Else - Actions
      • Set ChannelInteger[0] = (ChannelInteger[0] + 1)
      • Set ChannelInteger[1] = (ChannelInteger[1] + 1)
      • Set ChannelCaster[ChannelInteger[1]] = (Casting unit)
      • Set ChannelPoint[ChannelInteger[1]] = (Position of ChannelCaster[ChannelInteger[1]])
      • Unit - Create 1 Progress Bar (Dummy) for (Owner of ChannelCaster[ChannelInteger[1]]) at ChannelPoint[ChannelInteger[1]] facing Default building facing degrees
      • Set ChannelDummy[ChannelInteger[1]] = (Last created unit)
      • Custom script: call RemoveLocation( udg_ChannelPoint[udg_ChannelInteger[1]])
  • Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer ChannelInteger[2]) from 1 to ChannelInteger[1], do (Actions)
        • Loop - Actions
          • Animation - Change ChannelDummy[ChannelInteger[1]]'s animation speed to 41.67% of its original speed
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ChannelRuns[ChannelInteger[2]] Less than or equal to 0
            • Then - Actions
              • Set ChannelInteger[0] = 0
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ChannelInteger[0] Equal to 0
                • Then - Actions
                  • Set ChannelInteger[0] = 0
                  • Trigger - Add to Finish <gen> the event (Unit - A unit Stops casting an ability)
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
  • Finish
    • Events
    • Conditions
      • ChannelInteger[0] Equal to 0
    • Actions
      • Unit - Change color of ChannelDummy[ChannelInteger[1]] to Red
      • Animation - Change ChannelDummy[ChannelInteger[1]]'s animation speed to 0.00% of its original speed
      • Animation - Change ChannelDummy[ChannelInteger[1]]'s vertex coloring to (100.00%, 35.00%, 35.00%) with 0.00% transparency
      • Unit - Change color of ChannelDummy[ChannelInteger[1]] to Light Blue
      • Animation - Change ChannelDummy[ChannelInteger[1]]'s animation speed to 0.00% of its original speed
      • Animation - Change ChannelDummy[ChannelInteger[1]]'s vertex coloring to (75.00%, 75.00%, 100.00%) with 0.00% transparency
      • Unit - Kill ChannelDummy[ChannelInteger[1]]
:ogre_rage:It bugs like sometimes the dummy can't be killed if 1 or more unit casted at the same time
jmu0m4fjp
[/IMG]
 
Level 2
Joined
May 9, 2012
Messages
19
doesn't work lol
Finish
Events
Conditions
ChannelInteger[0] Equal to 0
Actions
For each (Integer ChannelInteger[2]) from 1 to ChannelInteger[1], do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering unit) Equal to ChannelCaster[ChannelInteger[2]]
Then - Actions
Unit - Change color of ChannelDummy[ChannelInteger[1]] to Red
Animation - Change ChannelDummy[ChannelInteger[1]]'s animation speed to 0.00% of its original speed
Animation - Change ChannelDummy[ChannelInteger[1]]'s vertex coloring to (100.00%, 35.00%, 35.00%) with 0.00% transparency
Unit - Change color of ChannelDummy[ChannelInteger[1]] to Light Blue
Animation - Change ChannelDummy[ChannelInteger[1]]'s vertex coloring to (75.00%, 75.00%, 100.00%) with 0.00% transparency
Animation - Change ChannelDummy[ChannelInteger[1]]'s animation speed to 0.00% of its original speed
Unit - Kill ChannelDummy[ChannelInteger[1]]
Else - Actions
 
Then remove data of ChannelInteger[2].
You removed the data of [1], which is the newest instance still.

I suggest you completely remove the second trigger and set the anim speed in the first trigger while adding an event to the last trigger.

This way the event does not get added every time a channel ends.
 
Status
Not open for further replies.
Top