• 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] Idea on how to make this Spell MUI

Status
Not open for further replies.
Level 7
Joined
Apr 18, 2010
Messages
102
The attached map is my spell pack on EMIYA. He uses a skill called Unlimited Blade Works that kind of mimics a Reality Marble from the source material. The spell transfers nearby units to a location on the map, and my solution to making it MUI right now is to allot different locations and make them unavailable/available depending on the number of current casts at a point in time. Problem is if I will make a 5v5 map, I will need to allot a total of 10 locations in the map...

Point is, is there a better solution? Any Ideas
 

Attachments

  • GUI_MUI_Emiya_spellpack.w3x
    659.1 KB · Views: 47
Level 7
Joined
Apr 18, 2010
Messages
102
  • Unlimited Blade Works
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Unlimited Blade Works
    • Actions
      • -------- Indexing Start --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • UBW_MUI_1 Equal to 0
        • Then - Actions
          • -------- If there are currently no instances running, we turn on the loop. --------
          • Trigger - Turn on Unlimited Blade Works Loop <gen>
        • Else - Actions
      • -------- Increases the indexes --------
      • Set UBW_MUI_1 = (UBW_MUI_1 + 1)
      • -------- Start of Dynamic Indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • UBW_MUI_1 Greater than UBW_MaxIndex
        • Then - Actions
          • -------- Indexing ~ ~ --------
          • Set UBW_MUI_2[UBW_MUI_1] = UBW_MUI_1
          • Set UBW_MaxIndex = UBW_MUI_1
        • Else - Actions
      • -------- End of Dynamic Indexing --------
      • -------- Makes it easier and cleaner. --------
      • Set Temp = UBW_MUI_2[UBW_MUI_1]
      • -------- Storing the Caster --------
      • Set UBW_Caster[Temp] = (Triggering unit)
      • -------- Storing the Player --------
      • Set UBW_Player[Temp] = (Owner of UBW_Caster[Temp])
      • -------- * * *Here you can set the Cast Time* * * --------
      • Set UBW_CastTime[Temp] = 2.00
      • -------- * * *Here you can set the Delay Time* * * --------
      • Set UBW_Delay[Temp] = 1.00
      • -------- * * *Here you can set the AoE of the Reality Marble* * * --------
      • Set UBW_AoE[Temp] = 600.00
      • -------- * * *Here you can set the Duration of the Reality Marble* * * --------
      • Set UBW_Duration[Temp] = 8.00
      • -------- Storing Caster Loc --------
      • Set UBW_CasterLoc[Temp] = (Position of UBW_Caster[Temp])
      • -------- Setting the Angle to 0 --------
      • Set UBW_Angle[Temp] = 0.00
      • -------- * * *Here you can Set the Animation Speed of the Caster* * * --------
      • Animation - Change UBW_Caster[Temp]'s animation speed to 40.00% of its original speed
      • -------- Setting UBW Group --------
      • Set UBW_EyeCandyGroup[Temp] = (Units in (Playable map area))
      • -------- Setting UBW Boolean to True. Used Later to Determine if Caster Creates UBW --------
      • Set UBW_Boolean[Temp] = True
      • Set UBW_Travel[Temp] = 0.00
      • Unit Group - Remove all units from UBW_EyeCandyGroup[Temp]
      • -------- Creating Ring of Flames --------
      • For each (Integer A) from 1 to 144, do (Actions)
        • Loop - Actions
          • -------- Storing Dummy Loc to Avoid Leaks --------
          • Set DummyLoc = (UBW_CasterLoc[Temp] offset by (UBW_AoE[Temp] + 25.00) towards UBW_Angle[Temp] degrees)
          • -------- Creating the Border --------
          • Unit - Create 1 UBW Border Dummy for UBW_Player[Temp] at DummyLoc facing UBW_Angle[Temp] degrees
          • -------- Increasing the Angle --------
          • Set UBW_Angle[Temp] = (UBW_Angle[Temp] + 2.50)
          • -------- Removing Dummy Loc --------
          • Custom script: call RemoveLocation(udg_DummyLoc)
          • -------- Adding Last Created Unit to Eye Candy Group --------
          • Unit Group - Add (Last created unit) to UBW_EyeCandyGroup[Temp]
      • -------- Setting Spell Stage --------
      • Set UBW_Stage[Temp] = 1
      • -------- * * *So AS I Pray* * * --------
      • Sound - Play Archer_UBW7_So__as_I_pray <gen> at 100.00% volume, attached to UBW_Caster[Temp]
  • Unlimited Blade Works Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer UBW_MUI_3) from 1 to UBW_MUI_1, do (Actions)
        • Loop - Actions
          • -------- Makes it easier to read and cleaner --------
          • Set Temp = UBW_MUI_2[UBW_MUI_3]
          • -------- Checks for Spell Stage --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UBW_Stage[Temp] Equal to 1
            • Then - Actions
              • -------- Checks if Caster is Still Channelling --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (UBW_Caster[Temp] is alive) Equal to True
                  • (Current order of UBW_Caster[Temp]) Equal to (Order(thunderclap))
                • Then - Actions
                  • -------- Checks for Cast Time --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • UBW_CastTime[Temp] Greater than 0.00
                    • Then - Actions
                      • -------- Reducing Cast Time --------
                      • Set UBW_CastTime[Temp] = (UBW_CastTime[Temp] - 0.05)
                    • Else - Actions
                      • -------- Setting Spell Stage to 2 --------
                      • Set UBW_Stage[Temp] = 2
                      • -------- Storing the Speed of the Fire Rush --------
                      • Set UBW_Speed[Temp] = (UBW_AoE[Temp] / (UBW_Delay[Temp] / 0.05))
                      • -------- Nulling Variables --------
                      • Set UBW_Travel[Temp] = 0.00
                      • Set UBW_Angle[Temp] = 0.00
                      • -------- Creating Fire Rush --------
                      • For each (Integer A) from 1 to 18, do (Actions)
                        • Loop - Actions
                          • -------- Creating Fire Rush --------
                          • Unit - Create 1 UBW Fire rush Dummy for UBW_Player[Temp] at UBW_CasterLoc[Temp] facing UBW_Angle[Temp] degrees
                          • -------- Adding Last Created Unit to Group --------
                          • Unit Group - Add (Last created unit) to UBW_EyeCandyGroup[Temp]
                          • -------- Increasing the Angle --------
                          • Set UBW_Angle[Temp] = (UBW_Angle[Temp] + 20.00)
                      • -------- * * *Unlimited Blade Works * * --------
                      • Sound - Play Archer_UBW8_Unlimited_Blade_Works <gen> at 100.00% volume, attached to UBW_Caster[Temp]
                      • -------- Fading Out --------
                      • Cinematic - Fade out and back in over 2.00 seconds using texture White Mask and color (100.00%, 26.00%, 26.00%) with 0.00% transparency
                      • -------- Restoring Animation Speed of Caster --------
                      • Animation - Change UBW_Caster[Temp]'s animation speed to 100.00% of its original speed
                • Else - Actions
                  • -------- Restoring Animation Speed of Caster --------
                  • Animation - Change UBW_Caster[Temp]'s animation speed to 100.00% of its original speed
                  • -------- Destroying Fires --------
                  • Unit Group - Pick every unit in UBW_EyeCandyGroup[Temp] and do (Actions)
                    • Loop - Actions
                      • Animation - Play (Picked unit)'s death animation
                      • Unit - Add a 0.30 second Generic expiration timer to (Picked unit)
                  • -------- Removing Leaks --------
                  • Custom script: call RemoveLocation(udg_UBW_CasterLoc[udg_Temp])
                  • Custom script: call RemoveLocation(udg_UBW_TargetLoc[udg_Temp])
                  • Custom script: call DestroyGroup(udg_UBW_EyeCandyGroup[udg_Temp])
                  • -------- Recycling all the Indexes --------
                  • Set UBW_MUI_2[UBW_MUI_3] = UBW_MUI_2[UBW_MUI_1]
                  • Set UBW_MUI_2[UBW_MUI_1] = Temp
                  • Set UBW_MUI_1 = (UBW_MUI_1 - 1)
                  • Set UBW_MUI_3 = (UBW_MUI_3 - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • UBW_MUI_1 Equal to 0
                    • Then - Actions
                      • -------- Turning off this trigger. Pointless to keep running --------
                      • Trigger - Turn off (This trigger)
                      • -------- -------------------------------------------------------- --------
                    • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UBW_Stage[Temp] Equal to 2
            • Then - Actions
              • -------- Checks if Caster creates a reality marble --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • UBW_Boolean[Temp] Equal to True
                • Then - Actions
                  • -------- Checks if the Fire Rush have reached the border --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • UBW_Travel[Temp] Less than UBW_AoE[Temp]
                    • Then - Actions
                      • -------- Picking the Fire Rush --------
                      • Unit Group - Pick every unit in UBW_EyeCandyGroup[Temp] and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of (Picked unit)) Equal to UBW Fire rush Dummy
                            • Then - Actions
                              • -------- Setting Dummy Location to Avoid Leaks --------
                              • Set CasterLoc = (Position of (Picked unit))
                              • Set TargetLoc = (CasterLoc offset by UBW_Speed[Temp] towards (Facing of (Picked unit)) degrees)
                              • -------- Moving Fire Rush --------
                              • Unit - Move (Picked unit) instantly to TargetLoc
                              • -------- Removing Leaks to Prevent Leak --------
                              • Custom script: call RemoveLocation(udg_CasterLoc)
                              • Custom script: call RemoveLocation(udg_TargetLoc)
                            • Else - Actions
                      • -------- Increasing the Distance Traveled --------
                      • Set UBW_Travel[Temp] = (UBW_Travel[Temp] + UBW_Speed[Temp])
                    • Else - Actions
                      • -------- Checks if Caster is Alive --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (UBW_Caster[Temp] is alive) Equal to True
                        • Then - Actions
                          • -------- Killing the Fire Rush --------
                          • Unit Group - Pick every unit in UBW_EyeCandyGroup[Temp] and do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of (Picked unit)) Equal to UBW Fire rush Dummy
                                • Then - Actions
                                  • Unit Group - Remove (Picked unit) from UBW_EyeCandyGroup[Temp]
                                  • Animation - Play (Picked unit)'s death animation
                                  • Unit - Add a 0.30 second Generic expiration timer to (Picked unit)
                                • Else - Actions
                          • -------- Increasing the Number of Reality Marbles --------
                          • Set RealityMarbleCount = (RealityMarbleCount + 1)
                          • -------- Creating the Reality Marble --------
                          • -------- Setting Reality Marble Location --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RealityMarbleCount Less than or equal to 1
                            • Then - Actions
                              • Set UBW_TargetLoc[Temp] = (Center of Reality Marbles 1 <gen>)
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RealityMarbleCount Equal to 2
                            • Then - Actions
                              • Set UBW_TargetLoc[Temp] = (Center of Reality Marbles 1 Copy 2 <gen>)
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RealityMarbleCount Equal to 3
                            • Then - Actions
                              • Set UBW_TargetLoc[Temp] = (Center of Reality Marbles 1 Copy 3 <gen>)
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RealityMarbleCount Equal to 4
                            • Then - Actions
                              • Set UBW_TargetLoc[Temp] = (Center of Reality Marbles 1 Copy <gen>)
                            • Else - Actions
                          • -------- Creating the Reality Marble --------
                          • Environment - Change terrain type at UBW_TargetLoc[Temp] to Barrens - Dirt using variation -1 in an area of size 6 and shape Circle
                          • -------- Creating the Border --------
                          • Unit Group - Pick every unit in UBW_EyeCandyGroup[Temp] and do (Actions)
                            • Loop - Actions
                              • -------- Setting Locations to Prevent Leaks --------
                              • Set DummyLoc = (Position of (Picked unit))
                              • Set Distance = (Distance between UBW_CasterLoc[Temp] and DummyLoc)
                              • Set Angle = (Angle from DummyLoc to UBW_CasterLoc[Temp])
                              • Set DummyLoc2 = (UBW_TargetLoc[Temp] offset by Distance towards Angle degrees)
                              • Set TargetLoc = (DummyLoc2 offset by 50.00 towards Angle degrees)
                              • -------- Moving the Fire Border --------
                              • Unit - Move (Picked unit) instantly to DummyLoc2
                              • -------- Creating Pathing Blocker --------
                              • Destructible - Create a Pathing Blocker (Both) (Large) at TargetLoc facing (Random angle) with scale 1.00 and variation 0
                              • -------- Removing Locations to Prevent Leaks --------
                              • Custom script: call RemoveLocation(udg_DummyLoc)
                              • Custom script: call RemoveLocation(udg_DummyLoc2)
                              • Custom script: call RemoveLocation(udg_TargetLoc)
                          • -------- Creating the Swords --------
                          • For each (Integer A) from 1 to 36, do (Actions)
                            • Loop - Actions
                              • -------- Storing the Dummy Loc to Prevent Leaks --------
                              • Set DummyLoc = (UBW_TargetLoc[Temp] offset by (Random real number between 0.00 and (UBW_AoE[Temp] - 50.00)) towards (Random real number between 0.00 and 360.00) degrees)
                              • -------- Creating the Swords --------
                              • Unit - Create 1 UBW Sword Dummy for UBW_Player[Temp] at DummyLoc facing (Random real number between 0.00 and 360.00) degrees
                              • -------- Adding Last Created Unit to Eye Candy Group --------
                              • Unit Group - Add (Last created unit) to UBW_EyeCandyGroup[Temp]
                              • -------- Removing leaks --------
                              • Custom script: call RemoveLocation(udg_DummyLoc)
                          • -------- Setting Angle to a random number between 0 and 360 --------
                          • Set UBW_Angle[Temp] = (Random real number between 0.00 and 360.00)
                          • -------- Creating Gears --------
                          • For each (Integer A) from 1 to 6, do (Actions)
                            • Loop - Actions
                              • -------- Storing the Dummy Loc to Prevent Leaks --------
                              • Set DummyLoc = (UBW_TargetLoc[Temp] offset by UBW_AoE[Temp] towards UBW_Angle[Temp] degrees)
                              • -------- Creating the Gear --------
                              • Unit - Create 1 UBW Gear Dummy for UBW_Player[Temp] at DummyLoc facing UBW_Angle[Temp] degrees
                              • -------- Adding Last Created Unit to Eye Candy Group --------
                              • Unit Group - Add (Last created unit) to UBW_EyeCandyGroup[Temp]
                              • -------- Removing leaks --------
                              • Custom script: call RemoveLocation(udg_DummyLoc)
                              • -------- Increasing the Angle --------
                              • Set UBW_Angle[Temp] = (UBW_Angle[Temp] + 60.00)
                              • -------- Setting Animation Speed of Gears --------
                              • Animation - Change (Last created unit)'s animation speed to 10.00% of its original speed
                          • -------- Setting UBW Target Group --------
                          • Set UBW_TargetGroup[Temp] = (Units within UBW_AoE[Temp] of UBW_CasterLoc[Temp] matching ((((Matching unit) is alive) Equal to True) and ((Level of Dummy Ability for (Matching unit)) Equal to 0)))
                          • -------- Moving Units to UBW --------
                          • Unit Group - Pick every unit in UBW_TargetGroup[Temp] and do (Actions)
                            • Loop - Actions
                              • -------- Setting Locations to Prevent Leak --------
                              • Set CasterLoc = (Position of (Picked unit))
                              • Set Distance = (Distance between CasterLoc and UBW_CasterLoc[Temp])
                              • Set Angle = (Angle from UBW_CasterLoc[Temp] to CasterLoc)
                              • Set TargetLoc = (UBW_TargetLoc[Temp] offset by Distance towards Angle degrees)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Distance Greater than UBW_AoE[Temp]
                                • Then - Actions
                                  • Set Distance = 700.00
                                • Else - Actions
                              • -------- Moving Targets --------
                              • Unit - Move (Picked unit) instantly to TargetLoc
                              • -------- Removing Leaks --------
                              • Custom script: call RemoveLocation(udg_CasterLoc)
                              • Custom script: call RemoveLocation(udg_TargetLoc)
                              • -------- Setting Camera --------
                              • Camera - Pan camera for (Owner of (Picked unit)) to UBW_TargetLoc[Temp] over 0.00 seconds
                              • -------- Disabling UBW for Unit --------
                              • Unit - Set level of Unlimited Blade Works for (Picked unit) to 2
                          • -------- Setting Spell Stage to 3 --------
                          • -------- ============================ --------
                          • -------- ========= Add Sword Dance HERE ========== --------
                          • -------- ============================ --------
                          • Unit - Add Sword Rain to UBW_Caster[Temp]
                          • Set UBW_Stage[Temp] = 3
                        • Else - Actions
                          • -------- Will not Create a Reality Marble. Destroying Eye Candy Group --------
                          • -------- Restoring Animation Speed of Caster --------
                          • Animation - Change UBW_Caster[Temp]'s animation speed to 100.00% of its original speed
                          • -------- Destroying Fires --------
                          • Unit Group - Pick every unit in UBW_EyeCandyGroup[Temp] and do (Actions)
                            • Loop - Actions
                              • Animation - Play (Picked unit)'s death animation
                              • Unit - Add a 0.30 second Generic expiration timer to (Picked unit)
                          • -------- Removing Leaks --------
                          • Custom script: call RemoveLocation(udg_UBW_CasterLoc[udg_Temp])
                          • Custom script: call RemoveLocation(udg_UBW_TargetLoc[udg_Temp])
                          • Custom script: call DestroyGroup(udg_UBW_EyeCandyGroup[udg_Temp])
                          • -------- Recycling all the Indexes --------
                          • Set UBW_MUI_2[UBW_MUI_3] = UBW_MUI_2[UBW_MUI_1]
                          • Set UBW_MUI_2[UBW_MUI_1] = Temp
                          • Set UBW_MUI_1 = (UBW_MUI_1 - 1)
                          • Set UBW_MUI_3 = (UBW_MUI_3 - 1)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • UBW_MUI_1 Equal to 0
                            • Then - Actions
                              • -------- Turning off this trigger. Pointless to keep running --------
                              • Trigger - Turn off (This trigger)
                              • -------- -------------------------------------------------------- --------
                            • Else - Actions
                • Else - Actions
                  • -------- Will not Create Own Reality Marble. --------
                  • -------- ============================ --------
                  • -------- ===========ADD SWORD DANCE HERE========== --------
                  • -------- ============================ --------
                  • Unit - Add Sword Rain to UBW_Caster[Temp]
                  • -------- Setting Spell Stage to 3 --------
                  • Set UBW_Stage[Temp] = 3
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UBW_Stage[Temp] Equal to 3
            • Then - Actions
              • -------- Checking Duration --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • UBW_Duration[Temp] Greater than 0.00
                  • (UBW_Caster[Temp] is alive) Equal to True
                • Then - Actions
                  • -------- Decreasing Duration --------
                  • Set UBW_Duration[Temp] = (UBW_Duration[Temp] - 0.05)
                • Else - Actions
                  • -------- ===== HERE REMOVE SWORD DANCE ==== --------
                  • Unit - Remove Sword Rain from UBW_Caster[Temp]
                  • -------- Checks if Caster has own RM --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • UBW_Boolean[Temp] Equal to True
                    • Then - Actions
                      • -------- Setting UBW target Group NOTE: Increased AoE just to be sure --------
                      • Set UBW_TargetGroup[Temp] = (Units within (UBW_AoE[Temp] + 150.00) of UBW_TargetLoc[Temp] matching ((((Matching unit) is alive) Equal to True) and ((Level of Dummy Ability for (Matching unit)) Equal to 0)))
                      • -------- Moving Units back to Map --------
                      • Unit Group - Pick every unit in UBW_TargetGroup[Temp] and do (Actions)
                        • Loop - Actions
                          • -------- Setting Locations to Prevent Leak --------
                          • Set CasterLoc = (Position of (Picked unit))
                          • Set Distance = (Distance between CasterLoc and UBW_TargetLoc[Temp])
                          • Set Angle = (Angle from UBW_TargetLoc[Temp] to CasterLoc)
                          • Set TargetLoc = (UBW_CasterLoc[Temp] offset by Distance towards Angle degrees)
                          • -------- Moving Targets --------
                          • Unit - Move (Picked unit) instantly to TargetLoc
                          • -------- Removing Leaks --------
                          • Custom script: call RemoveLocation(udg_CasterLoc)
                          • Custom script: call RemoveLocation(udg_TargetLoc)
                          • -------- Setting Camera --------
                          • Camera - Pan camera for (Owner of (Picked unit)) to UBW_CasterLoc[Temp] over 0.00 seconds
                          • -------- Enabling UBW for Unit --------
                          • Unit - Set level of Unlimited Blade Works for (Picked unit) to 1
                      • -------- Destroying the Reality Marble --------
                      • Unit Group - Pick every unit in UBW_EyeCandyGroup[Temp] and do (Actions)
                        • Loop - Actions
                          • Unit - Kill (Picked unit)
                      • -------- Destroying the Pathing Blockers --------
                      • Destructible - Pick every destructible within (UBW_AoE[Temp] + 100.00) of UBW_TargetLoc[Temp] and do (Actions)
                        • Loop - Actions
                          • Destructible - Kill (Picked destructible)
                          • Destructible - Remove (Picked destructible)
                    • Else - Actions
                  • -------- Removing Leaks --------
                  • Custom script: call RemoveLocation(udg_UBW_CasterLoc[udg_Temp])
                  • Custom script: call RemoveLocation(udg_UBW_TargetLoc[udg_Temp])
                  • Custom script: call DestroyGroup(udg_UBW_EyeCandyGroup[udg_Temp])
                  • Custom script: call DestroyGroup(udg_UBW_TargetGroup[udg_Temp])
                  • -------- Decreasing Number of Rms --------
                  • Set RealityMarbleCount = (RealityMarbleCount - 1)
                  • -------- Recycling all the Indexes --------
                  • Set UBW_MUI_2[UBW_MUI_3] = UBW_MUI_2[UBW_MUI_1]
                  • Set UBW_MUI_2[UBW_MUI_1] = Temp
                  • Set UBW_MUI_1 = (UBW_MUI_1 - 1)
                  • Set UBW_MUI_3 = (UBW_MUI_3 - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • UBW_MUI_1 Equal to 0
                    • Then - Actions
                      • -------- Turning off this trigger. Pointless to keep running --------
                      • Trigger - Turn off (This trigger)
                      • -------- -------------------------------------------------------- --------
                    • Else - Actions
            • Else - Actions
Well the title is a bit misleading, the spell IS Mui, but the problem is the way i made it MUI... is there a better way in recreating the spell's effects w/o having to create different locations for each spell cast of the spell at the same time?
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
In my opinion there's no way to do this without 10 separate areas. The only way to have them overlap in the same part of the map without allowing units from different simultaneous marbles to interact with each other would be to do some hackey hiding/showing of units for some players locally but I can't imagine that wouldn't cause an actual game state change and thus desynch everyone.

You might also want to consider what happens with nested casts. I.E. marble cast within a marble-- what sort of bugs do you get then?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
is there a better way in recreating the spell's effects w/o having to create different locations for each spell cast of the spell at the same time?
If you mean rects (GUI regions) then you can dynamically create and destroy them. One can duplicate a region constant this way and assign it unique to each instant, or create a region anywhere you want any size you need. If you do not want units from one cast to be affected by another cast when in overlapping areas they can be added to a group unique to each cast instant. If you do not want units to be affects by another cast if already under the effect then a global group holding all currently affected units can be used to exclude such units.
 
Level 7
Joined
Apr 18, 2010
Messages
102
In my opinion there's no way to do this without 10 separate areas. The only way to have them overlap in the same part of the map without allowing units from different simultaneous marbles to interact with each other would be to do some hackey hiding/showing of units for some players locally but I can't imagine that wouldn't cause an actual game state change and thus desynch everyone.

You might also want to consider what happens with nested casts. I.E. marble cast within a marble-- what sort of bugs do you get then?

I was hoping it wouldnt come to that 10 regions hahaha xD..

For nested casts, the first UBW caster makes the marble. If another caster casts another UBW inside it, or will be brought by it, the first UBW would just get its duration extended, while the second would still have its effects of giving its EMIYA the Sword Rain ability as well, (this will make it so that the first UBW's function of taking everybody back to where they were not be overwritten or bug out, anyways the purpose of the marble is to trap everyone and give EMIYA the sword spam ability)


If you mean rects (GUI regions) then you can dynamically create and destroy them. One can duplicate a region constant this way and assign it unique to each instant, or create a region anywhere you want any size you need. If you do not want units from one cast to be affected by another cast when in overlapping areas they can be added to a group unique to each cast instant. If you do not want units to be affects by another cast if already under the effect then a global group holding all currently affected units can be used to exclude such units.

Wow, I could do that?! (the whole create rects in triggers) ima try that.
Haven't I been using seperate groups from the start?
Anyways ima experiment on the rects thing, still It would mean that I have to create a large sized map to accommodate for those regions, right? But I can control the camera of the players anyway so thats not a big deal


Insteads moving units in AoE to the stage, why don't you generate the stage at the caster location.

because by doing so, there would be a risk that they be affected by spells/attacks from other units outside the marble. And if they have teleports/blinks could escape the marble (which is a bad thing =D )

Thanks for the help guys, I will experiment on this again..
Oh yea due to the nature of spell making in GUI, creating an AoS map with atleast 20 heroes and each of those heroes having 4 spells, and each spell being MUI, would have A TON of variables right?
Is there No way around that?
 
Level 6
Joined
May 2, 2015
Messages
109
You're creating a AoS map which supports multiplayer. I don't know much about Emiya abilities, but I think the other player will thinks it looks weird when they see the affected units suddently dissapear.
And I think the risk can be avoided by adding the affected units to a group and do some if statement.

  • Unit Group - Pick every unit in (the affected units) and do (Actions)
    • Loop - Actions
      • Set tempPoint[1] = (Position of (Picked unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between (tempPoint[1] and centerPoint) Greater than (AoE)
        • Then - Actions
          • Unit - Move (Picked unit) instantly to lastPoint
          • Set lastPoint = Position of (Picked Unit)
        • Else - Actions
Sorry, I'm too lazy. But, that's how
Store the lastPoint into hashtable
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
Oh yea due to the nature of spell making in GUI, creating an AoS map with atleast 20 heroes and each of those heroes having 4 spells, and each spell being MUI, would have A TON of variables right?
Is there No way around that?
No. However, there's functionally no performance cost to creating even a preposterous number of variables. The JNGP, for example, makes far more global arrays when it compiles its code down to regular JASS than you might ever realistically create in GUI so you're safe there.

Something you may want to watch out for is that if enough things run from the event "Map Initialization" the map init thread can crash and they'll all stop executing. I say this because you'll probably have a bunch of variables for spell parameters set at map init. To avoid this you can run them at "elapsed game time is X seconds" where X > 0.00.
You're creating a AoS map which supports multiplayer. I don't know much about Emiya abilities, but I think the other player will thinks it looks weird when they see the affected units suddently dissapear.
I personally don't think it would be weird if there was an obvious effect on all of the moved units or maybe some placeholder SFX at the locations they used to be until they're all returned. Another option would be to clone all the affected units onto their original locations for their original owners, set their animation speed to 0%, transparency to 30%, and then pause them. Boom: ghost versions of the units that used to be there!
 
Level 7
Joined
Apr 18, 2010
Messages
102
Oh Thank You guys!!!! +rep
No. However, there's functionally no performance cost to creating even a preposterous number of variables. The JNGP, for example, makes far more global arrays when it compiles its code down to regular JASS than you might ever realistically create in GUI so you're safe there.

Something you may want to watch out for is that if enough things run from the event "Map Initialization" the map init thread can crash and they'll all stop executing. I say this because you'll probably have a bunch of variables for spell parameters set at map init. To avoid this you can run them at "elapsed game time is X seconds" where X > 0.00.

I personally don't think it would be weird if there was an obvious effect on all of the moved units or maybe some placeholder SFX at the locations they used to be until they're all returned. Another option would be to clone all the affected units onto their original locations for their original owners, set their animation speed to 0%, transparency to 30%, and then pause them. Boom: ghost versions of the units that used to be there!

Ill remember the thing about the map init, thanks
still weighing about making all spells MUI vs Custom Cooldown System (Leaning towards MUI tho, even if its not MUI I wont use waits (no desync probs?))
For the disappearance part, there would be a SFX on the ground on the Caster's Location before the UBW transfer, The ghosts wouldnt work as when the units are returned they are returned to locations that relate to their previous distances from the center and angle from it whilst inside the reality marble
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
Wc3 doesn't randomly desynch on its own unless you use one of the few unsafe cinematic calls (pan as necessary for player for one, there might be a list of them around here somewhere) or are using terrain deformations and GetLocationZ().

Wait X seconds = safe
Wait X game-time seconds = can desynch
 
Status
Not open for further replies.
Top