• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] MUI Problem

Status
Not open for further replies.
Level 13
Joined
Oct 25, 2009
Messages
995
I have a problem with MUI Spell,here is the trigger and the map,can someone tell me why the hero will keep stucekd when 2 hero casted on different unit or same unit?
  • StraightRush
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt ROOAR
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SR_Index1 Equal to 0
        • Then - Actions
          • Trigger - Turn on StraightRushMovement <gen>
        • Else - Actions
      • Set SR_Index1 = (SR_Index1 + 1)
      • Set SR_Index2 = (SR_Index2 + 1)
      • Set SR_Caster[SR_Index2] = (Triggering unit)
      • Set SR_Target[SR_Index2] = (Target unit of ability being cast)
      • Set SR_CasterPoint[SR_Index2] = (Position of SR_Caster[SR_Index2])
      • Set SR_TargetPoint[SR_Index2] = (Position of SR_Target[SR_Index2])
      • Set SR_Point[SR_Index2] = (Distance between SR_CasterPoint[SR_Index2] and SR_TargetPoint[SR_Index2])
      • Set SR_Angle[SR_Index2] = (Angle from SR_CasterPoint[SR_Index2] to SR_TargetPoint[SR_Index2])
      • Set SR_Damage[SR_Index2] = (6.00 x (Real((Strength of SR_Caster[SR_Index2] (Include bonuses)))))
      • Unit - Make SR_Caster[SR_Index2] face SR_Angle[SR_Index2] over 0.10 seconds
      • Unit - Pause SR_Caster[SR_Index2]
      • Animation - Change SR_Target[SR_Index2]'s animation speed to 300.00% of its original speed
      • Animation - Play SR_Caster[SR_Index2]'s attack animation
      • Unit - Turn collision for SR_Caster[SR_Index2] Off
  • StraightRushMovement
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SR_IndexLoop3) from 1 to SR_Index2, do (Actions)
        • Loop - Actions
          • Set SR_Speed[SR_IndexLoop3] = (0.40 x (Real((Level of Storm Bolt ROOAR for SR_Caster[SR_IndexLoop3]))))
          • Set SR_CasterPoint[SR_IndexLoop3] = (Position of SR_Caster[SR_IndexLoop3])
          • Set SR_TargetPoint[SR_IndexLoop3] = (Position of SR_Target[SR_IndexLoop3])
          • Set SR_Angle[SR_IndexLoop3] = (Angle from SR_CasterPoint[SR_IndexLoop3] to SR_TargetPoint[SR_IndexLoop3])
          • Unit - Move SR_Caster[SR_IndexLoop3] instantly to ((Position of SR_Caster[SR_IndexLoop3]) offset by (50.00 + SR_Speed[SR_IndexLoop3]) towards SR_Angle[SR_IndexLoop3] degrees), facing SR_Angle[SR_IndexLoop3] degrees
          • Animation - Play SR_Caster[SR_IndexLoop3]'s attack animation
          • Special Effect - Create a special effect attached to the right,hand of SR_Caster[SR_IndexLoop3] using Abilities\Spells\Items\AIlb\AIlbSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set SR_Point[SR_IndexLoop3] = (Distance between SR_CasterPoint[SR_IndexLoop3] and SR_TargetPoint[SR_IndexLoop3])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SR_Point[SR_IndexLoop3] Less than or equal to 100.00
            • Then - Actions
              • Unit - Cause SR_Caster[SR_IndexLoop3] to damage SR_Target[SR_IndexLoop3], dealing (SR_Damage[SR_IndexLoop3] + SR_Speed[SR_IndexLoop3]) damage of attack type Normal and damage type Normal
              • Special Effect - Create a special effect attached to the origin of SR_Target[SR_IndexLoop3] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set SR_Boolean[SR_IndexLoop3] = False
              • Set SR_Speed[SR_IndexLoop3] = 0.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SR_Boolean[SR_IndexLoop3] Equal to False
                • Then - Actions
                  • Unit - Unpause SR_Caster[SR_IndexLoop3]
                  • Animation - Change SR_Caster[SR_IndexLoop3]'s animation speed to 100.00% of its original speed
                  • Unit - Turn collision for SR_Caster[SR_IndexLoop3] On
                  • Set SR_Index1 = (SR_Index1 - 1)
                  • Set SR_Boolean[SR_IndexLoop3] = True
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SR_Index1 Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set SR_Index2 = 0
        • Else - Actions
Map Here:
P/S: mckill2009 help me before,i had learned many about Index from him,who can help me i will +REP.
EDIT: Why i cannot use custom script as
  • Custom script: call RemoveLocation(udg_SR_CasterPoint[SR_Index2])
in the Ability Start?
EDIT 2: After casted 3 times or 4 times,it will cause the bug appear.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,243
EDIT: Why i cannot use custom script as
  • Custom script: call RemoveLocation(udg_SR_CasterPoint[SR_Index2])
in the Ability Start?

You forgot the udg_ prefix from the SR_Index2.

I will take a look at the spell.

EDIT: I modified the spell a bit. I changed thel loop time and reorganized the looping trigger. I also added checks for caster's and target's alive status.

http://www.hiveworkshop.com/forums/pastebin.php?id=0q1whm
 
Level 13
Joined
Oct 25, 2009
Messages
995
You forgot the udg_ prefix from the SR_Index2.

I will take a look at the spell.

EDIT: I modified the spell a bit. I changed thel loop time and reorganized the looping trigger. I also added checks for caster's and target's alive status.

http://www.hiveworkshop.com/forums/pastebin.php?id=0q1whm

How can i remove the variables of point?udg_prefix mean? =.=
EDIT: It work,but the boolean useless for now?And why i cannot add REP to u?It say you must spread some REP around before giving it to Maker?
EDIT 2: That is MUI or GUI? If i set the cast range more far,2 people together cast,the first of touch the target unit will unpause,but another unit will pause,cannot move anymore =-=
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,243
So,it is MUI or GUI?

GUI is the interface with which you construct triggers by selecting different events, actions and conditions. So yes, the spell is created with GUI.

MUI means that multiole units can use the spell at the same time. The spell is MUI, just make sure the boolean is set to false here:
  • Else - Actions
    • Unit - Unpause SR_Caster[SR_IndexLoop3]
    • Animation - Change SR_Caster[SR_IndexLoop3]'s animation speed to 100.00% of its original speed
    • Unit - Turn collision for SR_Caster[SR_IndexLoop3] On
    • Set SR_Index1 = (SR_Index1 - 1)
    • Set SR_Boolean[SR_IndexLoop3] = False
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • SR_Index1 Equal to 0
      • Then - Actions
        • Trigger - Turn off (This trigger)
        • Set SR_Index2 = 0
      • Else - Actions
 
Level 13
Joined
Oct 25, 2009
Messages
995
GUI is the interface with which you construct triggers by selecting different events, actions and conditions. So yes, the spell is created with GUI.

MUI means that multiole units can use the spell at the same time. The spell is MUI, just make sure the boolean is set to false here:
  • Else - Actions
    • Unit - Unpause SR_Caster[SR_IndexLoop3]
    • Animation - Change SR_Caster[SR_IndexLoop3]'s animation speed to 100.00% of its original speed
    • Unit - Turn collision for SR_Caster[SR_IndexLoop3] On
    • Set SR_Index1 = (SR_Index1 - 1)
    • Set SR_Boolean[SR_IndexLoop3] = False
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • SR_Index1 Equal to 0
      • Then - Actions
        • Trigger - Turn off (This trigger)
        • Set SR_Index2 = 0
      • Else - Actions

So the full trigger just like this?
  • StraightRush
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Straight Rush
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SR_Index1 Equal to 0
        • Then - Actions
          • Trigger - Turn on StraightRushMovement <gen>
        • Else - Actions
      • Set SR_Index1 = (SR_Index1 + 1)
      • Set SR_Index2 = (SR_Index2 + 1)
      • Set SR_Boolean[SR_Index2] = True
      • Set SR_Caster[SR_Index2] = (Triggering unit)
      • Set SR_Target[SR_Index2] = (Target unit of ability being cast)
      • Set SR_CasterPoint[SR_Index2] = (Position of SR_Caster[SR_Index2])
      • Set SR_TargetPoint[SR_Index2] = (Position of SR_Target[SR_Index2])
      • Set SR_Point[SR_Index2] = (Distance between SR_CasterPoint[SR_Index2] and SR_TargetPoint[SR_Index2])
      • Set SR_Angle[SR_Index2] = (Angle from SR_CasterPoint[SR_Index2] to SR_TargetPoint[SR_Index2])
      • Set SR_Damage[SR_Index2] = (6.00 x (Real((Strength of SR_Caster[SR_Index2] (Include bonuses)))))
      • Unit - Make SR_Caster[SR_Index2] face SR_Angle[SR_Index2] over 0.10 seconds
      • Unit - Pause SR_Caster[SR_Index2]
      • Animation - Change SR_Target[SR_Index2]'s animation speed to 300.00% of its original speed
      • Animation - Play SR_Caster[SR_Index2]'s attack animation
      • Unit - Turn collision for SR_Caster[SR_Index2] Off
  • StraightRushMovement
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SR_IndexLoop3) from 1 to SR_Index2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SR_Boolean[SR_IndexLoop3] Equal to True
              • (SR_Caster[SR_IndexLoop3] is alive) Equal to True
              • (SR_Target[SR_IndexLoop3] is alive) Equal to True
            • Then - Actions
              • Set SR_Speed[SR_IndexLoop3] = (0.40 x (Real((Level of Straight Rush for SR_Caster[SR_IndexLoop3]))))
              • Set SR_CasterPoint[SR_IndexLoop3] = (Position of SR_Caster[SR_IndexLoop3])
              • Set SR_TargetPoint[SR_IndexLoop3] = (Position of SR_Target[SR_IndexLoop3])
              • Set SR_Angle[SR_IndexLoop3] = (Angle from SR_CasterPoint[SR_IndexLoop3] to SR_TargetPoint[SR_IndexLoop3])
              • Unit - Move SR_Caster[SR_IndexLoop3] instantly to ((Position of SR_Caster[SR_IndexLoop3]) offset by (50.00 + SR_Speed[SR_IndexLoop3]) towards SR_Angle[SR_IndexLoop3] degrees), facing SR_Angle[SR_IndexLoop3] degrees
              • Animation - Play SR_Caster[SR_IndexLoop3]'s attack animation
              • Special Effect - Create a special effect attached to the right,hand of SR_Caster[SR_IndexLoop3] using Abilities\Spells\Items\AIlb\AIlbSpecialArt.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set SR_Point[SR_IndexLoop3] = (Distance between SR_CasterPoint[SR_IndexLoop3] and SR_TargetPoint[SR_IndexLoop3])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SR_Point[SR_IndexLoop3] Less than or equal to 100.00
                • Then - Actions
                  • Unit - Cause SR_Caster[SR_IndexLoop3] to damage SR_Target[SR_IndexLoop3], dealing (SR_Damage[SR_IndexLoop3] + SR_Speed[SR_IndexLoop3]) damage of attack type Normal and damage type Normal
                  • Special Effect - Create a special effect attached to the origin of SR_Target[SR_IndexLoop3] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Set SR_Boolean[SR_IndexLoop3] = False
                  • Set SR_Speed[SR_IndexLoop3] = 0.00
                • Else - Actions
            • Else - Actions
              • Unit - Unpause SR_Caster[SR_IndexLoop3]
              • Animation - Change SR_Caster[SR_IndexLoop3]'s animation speed to 100.00% of its original speed
              • Unit - Turn collision for SR_Caster[SR_IndexLoop3] On
              • Set SR_Index1 = (SR_Index1 - 1)
              • Set SR_Boolean[SR_IndexLoop3] = False
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SR_Index1 Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Set SR_Index2 = 0
                • Else - Actions
EDIT: Woah! The bug appear again,if the unit doesn't die,it will keep strike the unit until the unit die @o@
 
Status
Not open for further replies.
Top