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.
 
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.
 
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.
 
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.
 
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.
 
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?
 
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
 
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.
 
This may be stupid but the event of the first trigger should be : unit begins casting an ability?
 
Nonono, that is before any mana has been taken or anything, it should be Unit Starts the Effect of An Ability
 
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?
 
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?
 
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.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top