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

[Trigger] How to make Multi Instanceable

Status
Not open for further replies.
Level 3
Joined
Jun 7, 2007
Messages
33
How would I make the following trigger multi instanceable? Yes I know there was probably a better/easier way to make this trigger but I'm not too good with triggers. I'm just happy that it works ^_^. I would probably have to use local variables etc..but I don't really know how so if someone could explain how to make it multi instanceable I would be very happy

  • Commanding Shout
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Commanding Shout
    • Actions
      • Unit Group - Pick every unit in (Units within 600.00 of (Position of (Casting unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Picked unit)) is an ally of (Owner of (Casting unit))) Equal to True
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • Advanced - For (Picked unit) Increase life maximum by 800
              • Set commandingshout[(cmdshout + 1)] = (Picked unit)
              • Set cmdshout = (cmdshout + 1)
            • Else - Actions
              • Do nothing
      • Wait 150.00 seconds
      • Set cmdshout = 0
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Advanced - For commandingshout[(cmdshout + 1)] Decrease life maximum by 800
          • Set cmdshout = (cmdshout + 1)
      • Set cmdshout = 0
 
Last edited:
Level 9
Joined
Jul 18, 2005
Messages
320
Use trigger tags god dammit.

Firstly Welcome to you first post at Hive...(The mods do the rest)

Ok unit groups are one thing tht don't make GUI Spells MUI same with player groups. I see tht you are using Bonus Mod as Well using WEU advanced triggers. So unless you don't have an other different WEU featrues used apart for just that, get the standalone version of bonus mod here.

I just explained why you spell isn't MUI. I don't have time to change it for you though but read wrymlords tut here.

-Av3n
 
Level 3
Joined
Jun 7, 2007
Messages
33
Ohhh! I figured out what you meant by trigger tags, lol. Sorry for posting a screenshot instead. I got it now ^_^ Guess that makes it easier for you to copy into your post if you edit it lol. I edited my previous post and put it in trigger tags. I didn't get the bonus mod thing, but that other post really helped me understand local variables alot better....I think I'm gonna try and remake my trigger. I'll still probably do it wrong but it's worth a try ^_^. And thank you, it's nice to be here. I never signed up on the wc3sear.ch forums but I was very active there. Always ninjaing some skins =p or looking at spells to further advance my triggering capabilities. I like what I did with this trigger, even if its not MUI. But it won't be much use to anyone unless it is I suppose.

Edit: Would adding local unit udg_commandingshout and local integer udg_cmdshout help fix it? Wouldn't that make it closer to MUI? Lol don't know if that would completely fix it but what I understood by the tutorial was if I ad that it treats those variables like locals instead of globals.

I added those in and I got an error on my WEU so I'm guessing thats not what I'm supposed to do =(

Edit edit xD: Well....I found a mistake...I put local INTERGER instead of INTEGER....now I only get one compile error.

call ChangeLife( udg_commandingshout[( udg_cmdshout + 1 )], false, 800 )
 
Last edited:
  • Commanding Shout
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Commanding Shout
    • Actions
      • Custom Script: local group udg_CommandingShoutGroup
      • Set TempPoint = Position of (Casting unit)
      • Custom Script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 600 of TempPoint) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Picked unit)) is an ally of (Owner of (Casting unit))) Equal to True
              • ((Picked unit) is A Hero) Equal to True
            • Then - Actions
              • Advanced - For (Picked unit) Increase life maximum by 800
              • Unit Group - Add (Picked unit) to CommandingShoutGroup
            • Else - Actions
      • Custom Script: call RemoveLocation ( udg_TempPoint )
      • Wait 150.00 seconds
      • Unit Group - Pick every unit in CommandingShoutGroup and do (Actions)
        • Advanced - For (Picked unit) Decrease life maximum by 800
      • Unit Group - Clear CommandingShoutGroup
      • Custom Script: set udg_CommandingShoutGroup = null
.

There. Fixed it up for you. You dont need any integer stuff, just a point variable (to remove leaks) and a unit group variable called CommandingShoutGroup. Also, make sure you copy the custom script stuff exactly, as it's case sensitive!

I haven't tested this yet, so if it doesn't work, tell me!
 
Last edited:
Status
Not open for further replies.
Top