How to make this spell work?

Crimson

Member
Reaction score
3
So, I'm trying to make an MUI meteor spell. I've finished the trigger but the spell won't work as if the unit was only casting the dummy spell. Here's the trigger. Can anyone see what's wrong with it? I've checked everything else. The heroes have the right skill, dummy units have a model...etc.

Trigger:
  • Meteorain Setup
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Meteorain
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MR_Index Less than 1000
        • Then - Actions
          • Set MR_Index = (MR_Index + 1)
        • Else - Actions
          • Set MR_Index = 0
      • Set MR_caster[MR_Index] = (Triggering unit)
      • Set MR_loc[0] = (Target point of ability being cast)
      • Set MR_Rect[MR_Index] = (Region centered at MR_loc[0] with size (400.00, 400.00))
      • Set MR_damage[MR_Index] = (120.00 + ((Real((Level of Meteorain for MR_caster[MR_Index]))) x (Real((Strength of MR_caster[MR_Index] (Include bonuses))))))
      • Trigger - Turn on Meteorain Periodic <gen>

Trigger:
  • Meteorain Periodic
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
    • Actions
      • Set MR_integer[MR_Index] = (MR_integer[MR_Index] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MR_integer[MR_Index] Equal to (Level of Meteorain for MR_caster[MR_Index])
        • Then - Actions
          • Custom script: call RemoveLocation(udg_MR_loc[0])
          • Custom script: call RemoveLocation(udg_MR_loc[1])
          • Custom script: call RemoveLocation(udg_MR_loc[2])
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Set MR_loc[1] = (Random point in MR_Rect[MR_Index])
          • Unit - Create 1 Meteors for (Owner of MR_caster[MR_Index]) at MR_loc[1] facing (Random angle) degrees
          • Set MR_Meteor[MR_Index] = (Last created unit)
          • Set MR_loc[2] = (Position of MR_Meteor[MR_Index])
          • Unit - Add a 3.00 second Generic expiration timer to MR_Meteor[MR_Index]
          • Special Effect - Create a special effect at MR_loc[2] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set MR_Group[MR_Index] = (Units within 150.00 of MR_loc[2] matching (((Matching unit) belongs to an enemy of (Owner of MR_caster[MR_Index])) Equal to True))
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in MR_Group[MR_Index] and do (Actions)
            • Loop - Actions
              • Unit - Cause MR_caster[MR_Index] to damage (Picked unit), dealing MR_damage[MR_Index] damage of attack type Chaos and damage type Normal

WE also gives me errors when trying to save it saying that MR_Index is an undeclared variable so I couldn't use the usual custom scripts to some clear stuff up, making me resort to using that bj_wantDestroyGroup. Can anyone tell me how to write this trigger better? Oh and sorry if the spoiler tags don't work.
 

Happy

Well-Known Member
Reaction score
71
i think using call DestroyGroup(udg_MR_Group[udg_MR_Index]) works...just put it after the every group action and it should be it.
 

Crimson

Member
Reaction score
3
That's the first thing I tried but it seems that every custom script that has MR_Index gives an error because MR_Index is an 'undefined variable'. I also tried testing the map without the custom scripts but the trigger still won't work.
 

NeuroToxin

New Member
Reaction score
46
I think your meaning to do a loop at the top of the every .3 seconds thing, from 1 to MRIndex, because MRIndex will simply increase and there wont be anything in it.
 

Crimson

Member
Reaction score
3
Okay...I'll try doing that but will that fix the errors that MR_Index causes? You know, the one that comes after trying to save a map? I can't write any custom scripts referring to it, making the spell leak.
 

Crimson

Member
Reaction score
3
Wait...actually the whole problem is more serious than I thought. None of the triggers are working in the map now. So what could the problem be?
 

Shadow

TH.net Regular
Reaction score
23
if its says your trigger have errors it usually disables all your triggers i think. try disabling your spell triggers and see if it will save
 

NeuroToxin

New Member
Reaction score
46
No thats not it. If you have multiple arrays over 1000ish size, the map cannot initialize all that space, and it won't be running any triggers, reduce the array sizes.
 

Grobak

New Member
Reaction score
1
This may be stupid but the event of the first trigger should be : unit begins casting an ability?
 

NeuroToxin

New Member
Reaction score
46
Nonono, that is before any mana has been taken or anything, it should be Unit Starts the Effect of An Ability
 

Crimson

Member
Reaction score
3
No thats not it. If you have multiple arrays over 1000ish size, the map cannot initialize all that space, and it won't be running any triggers, reduce the array sizes.

Oh, I think that's what I did. So when trying to make an MUI spell, what's the best size for the arrays?
 

Crimson

Member
Reaction score
3
Thanks and I'll ask again to make it clear. I should not set all the arrays of an MUI spell to the maximum of 8912, right? 200-500 should be plenty good enough, yes?
 

NeuroToxin

New Member
Reaction score
46
Yes. As that gives enough time to recycle too. and 8192 just is too much for the game to initialize.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top