• 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.

[Spell] MUI problems and some BUGS

Status
Not open for further replies.
Level 6
Joined
May 4, 2012
Messages
187
Well I've been afh (away from Hive) for about 6~7 months and if I visit hive, its because I am summoned. Well enough about my self :ogre_icwydt:


So I was just playing around in WE and I got some problems when I tried to do a custom spell.

My problems are the following:
•MUI'ness (Tho this time I can fix it but I am not really sure...)
•Bugs and stuff (My wc3 crashes when I add a specific action... I'll explain that later)

So, the first problem isn't really a problem to me since I partially know how to fix it, but still I need your help so that I will be sure.

However in the second problem I got some bugs. Everytime I add the action,
  • Unit Group - Pick every unit in (Units within 150.00 of DL_CasterPNT[DL_Max]) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Picked unit) is A structure) Not equal to True
              • ((Picked unit) belongs to an ally of (Owner of DL_Caster[DL_Max])) Equal to True
        • Then - Actions
          • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (50.00 + (50.00 x (Real((Level of Dashing Light for DL_Caster[DL_Max]))))) damage of attack type Spells and damage type Normal
        • Else - Actions
It bugs.

The Whole Trigger:
  • Dashing Light
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dashing Light
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DL_Max Equal to 0
        • Then - Actions
          • Trigger - Turn on Dashing Light LOOP <gen>
        • Else - Actions
      • Set DL_Max = (DL_Max + 1)
      • Set DL_Caster[DL_Max] = (Triggering unit)
      • Set DL_CasterPNT[DL_Max] = (Position of DL_Caster[DL_Max])
      • Special Effect - Create a special effect at DL_CasterPNT[DL_Max] using Arcane Nova.mdx
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the weapon of DL_Caster[DL_Max] using Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
      • Set DL_SFX1[DL_Max] = (Last created special effect)
      • Animation - Change DL_Caster[DL_Max]'s vertex coloring to (50.00%, 50.00%, 50.00%) with 20.00% transparency
      • Set DL_TraveledValue[DL_Max] = ((1.10 x (Real((Intelligence of DL_Caster[DL_Max] (Include bonuses))))) + 0.00)
      • Unit Group - Add DL_Caster[DL_Max] to DL_DashGRP[DL_Max]
      • Custom script: call RemoveLocation (udg_DL_CasterPNT[udg_DL_Max])
  • Dashing Light LOOP
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in DL_DashGRP[DL_Max] and do (Actions)
        • Loop - Actions
          • Set DL_CounterTimer[DL_Max] = (DL_CounterTimer[DL_Max] + 0.05)
          • Set DL_Caster[DL_Max] = (Picked unit)
          • Unit - Pause DL_Caster[DL_Max]
          • Set DL_CasterPNT[DL_Max] = (Position of DL_Caster[DL_Max])
          • Set DL_OffsetPNT[DL_Max] = (DL_CasterPNT[DL_Max] offset by DL_TraveledValue[DL_Max] towards (Facing of DL_Caster[DL_Max]) degrees)
          • Special Effect - Create a special effect at DL_OffsetPNT[DL_Max] using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Move DL_Caster[DL_Max] instantly to DL_OffsetPNT[DL_Max]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DL_CounterTimer[DL_Max] Greater than or equal to 0.50
            • Then - Actions
              • Animation - Change DL_Caster[DL_Max]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Special Effect - Create a special effect at DL_CasterPNT[DL_Max] using Arcane Nova.mdx
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Destroy DL_SFX1[DL_Max]
              • Unit - Unpause DL_Caster[DL_Max]
              • Set DL_CounterTimer[DL_Max] = 0.00
              • Set DL_Max = (DL_Max - 1)
              • Set DL_Caster[DL_Max] = No unit
              • Trigger - Turn off (This trigger)
            • Else - Actions
          • Custom script: call RemoveLocation (udg_DL_OffsetPNT[udg_DL_Max])
TEST MAP LINK: http://www.hiveworkshop.com/forums/pastebin.php?id=zpbhf2

Hope someone will help me :ogre_datass:

EDIT: THE BUG IS THAT IT WILL CRASH WC3! CARE~ ♥
 
I think its because the group isn't created... If ur gonna use a group array in GUI, better put 8191 in the initialization so that GUI autocreates the max number of groups... Adding a unit to a non-initialized/created group will cause fatal error...

Also, its not MUI coz you only process the latest instance... You will need to loop thru 1 up to DL_Max...

Then you would still need to do things like clear the groups when the instance is finished etc...

btw:

  • Loop - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Picked unit) is A structure) Not equal to True
          • ((Picked unit) belongs to an ally of (Owner of DL_Caster[DL_Max])) Equal to True
is just the same as

  • Loop - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Picked unit) is A structure) Not equal to True
        • ((Picked unit) belongs to an ally of (Owner of DL_Caster[DL_Max])) Equal to True
Also, on the added trigger, you used last created unit, but I haven't seen a line that creates a unit... It might also be causing the errors
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
  • Unit Group - Pick every unit in (Units within 150.00 of DL_CasterPNT[DL_Max]) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Picked unit) is A structure) Not equal to True
              • ((Picked unit) belongs to an ally of (Owner of DL_Caster[DL_Max])) Equal to True
        • Then - Actions
          • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (50.00 + (50.00 x (Real((Level of Dashing Light for DL_Caster[DL_Max]))))) damage of attack type Spells and damage type Normal
        • Else - Actions
It bugs.

You're leaking Unit group. Add
  • Custom script: set bj_wantDestroyGroup = true
before the "Pick every unit..."

Also, as Adiktuz said, there's no unit creation, so the (last created unit) can be anything, and the thing about the group array size too.
 
also get rid of the and condition. Only time u need the and is inside an or condition.

this
  • Unit Group - Pick every unit in DL_DashGRP[DL_Max] and do (Actions)
is also only looping through the DL_DashGRP[DL_Max]. It does not loop through like a proper spell should. Also u shouldnt need a group for this. Look in my tutorial Things a GUIer should know it will show u how to properly index.
 
Status
Not open for further replies.
Top