Multicast issue

Level 4
Joined
Dec 31, 2018
Messages
21
I followed a tutorial to create spells with multicast using Ruke's MUI system, but when I tried to modify one of them so that it affected friendly units, it doesn't work properly. Here are the triggers:

  • Multicast BL
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bloodlust (Ogre)
      • (Level of Multicast (Icon) for (Triggering unit)) Greater than 0
    • Actions
      • Set VariableSet ChanceRandom = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ChanceRandom Greater than or equal to 35
        • Then - Actions
          • Set VariableSet set_integer[1] = 1
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Multicast (Icon) for (Triggering unit)) Greater than 0
              • ChanceRandom Greater than or equal to 80
            • Then - Actions
              • Set VariableSet set_integer[1] = 2
            • Else - Actions
        • Else - Actions
          • Set VariableSet set_integer[1] = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • set_integer[1] Greater than 0
        • Then - Actions
          • Set VariableSet set_point[1] = (Position of (Triggering unit))
          • Set VariableSet set_group[1] = (Units within 700.00 of set_point[1] matching ((((Matching unit) belongs to an ally of (Owner of (Triggering unit)).) Equal to True) and (((Matching unit) is alive) Equal to True)).)
          • Set VariableSet set_unit[1] = (Triggering unit)
          • Unit - Create 1 DUMMY_CASTER_ID for (Owner of set_unit[1]) at set_point[1] facing Default building facing degrees
          • Unit - Add Bloodlust (Ogre) (DUMMY) to (Last created unit)
          • Floating Text - Create floating text that reads (X + (String((set_integer[1] + 1)))) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 35.00%, 35.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 10.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Set VariableSet set_unit[2] = (Last created unit)
          • Set VariableSet used_integers = 1
          • Set VariableSet used_groups = 1
          • Set VariableSet used_points = 1
          • Set VariableSet used_units = 3
          • Set VariableSet trigger = Multicast BL Loop <gen>
          • Set VariableSet timeout = 0.80
        • Else - Actions
This is the loop

  • Multicast BL Loop
    • Events
    • Conditions
    • Actions
      • Set VariableSet get_point[1] = (Position of get_unit[1])
      • Unit - Order get_unit[2] to Orc Shaman - Bloodlust (Random unit from get_group[1])
      • Unit - Reset ability cooldowns for get_unit[2].
      • Set VariableSet get_integer[1] = (get_integer[1] - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • get_integer[1] Equal to 0
        • Then - Actions
          • Unit - Remove get_unit[2] from the game
          • Set VariableSet automaticClean = True
          • Set VariableSet finish = True
        • Else - Actions
What I tried to do was changing the ability of an existing, working trigger from acid bomb to bloodlust, and make a group with friendly units instead of hostile ones. The floating text will display, indicating that the trigger works to an extent, but only the main target will get bloodlust. I might have missed something, but I can't see anything wrong. I am not an expert on triggers and this is the first time I use the MUI system (or any system) so there's also that.
 
Level 11
Joined
Nov 15, 2007
Messages
800
When you say the system worked before and all you changed was the spell my first thought is, did you forget any relevant object editor data for the dummy spell that might prevent it from being cast? I.E. mana cost, requirements (like bloodlust requiring shaman research).
 
Level 4
Joined
Dec 31, 2018
Messages
21
When you say the system worked before and all you changed was the spell my first thought is, did you forget any relevant object editor data for the dummy spell that might prevent it from being cast? I.E. mana cost, requirements (like bloodlust requiring shaman research).
No requirements for the spell and my dummy has maximum mana (100k). I have also made a simpler trigger to see if the dummy would cast the spell and it indeed does, that's why I think the problem has to come from this trigger, but it literally works with other spells so no clue. I'm on Reforged btw, that might be relevant.

Edit: Turns out I had forgotten my "Bloodlust" ability is actually based on Inner Fire, so of course the dummy did nothing, because I was giving him the wrong order... It works now, but I cannot get it to be consistent. Sometimes the text will appear but the multicast doesn't happen or it casts less spells than it's supposed to.
 
Last edited:
Level 11
Joined
Nov 15, 2007
Messages
800
Edit: Turns out I had forgotten my "Bloodlust" ability is actually based on Inner Fire, so of course the dummy did nothing, because I was giving him the wrong order... It works now, but I cannot get it to be consistent. Sometimes the text will appear but the multicast doesn't happen or it casts less spells than it's supposed to.
When a unit has bloodlust cast on them, it should be removed from the target group. Otherwise the same unit can be chosen multiple times which would obviously not stack since it's a buff rather than an instant effect.

E.G. in your loop instead of
  • Unit - Order get_unit[2] to Orc Shaman - Bloodlust (Random unit from get_group[1])
  • set TargetUnit = (Random unit from get_group[1])
  • Unit - Order get_unit[2] to Orc Shaman - Bloodlust TargetUnit
  • Unit Group - Remove TargetUnit from get_group[2]
 
Level 4
Joined
Dec 31, 2018
Messages
21
When a unit has bloodlust cast on them, it should be removed from the target group. Otherwise the same unit can be chosen multiple times which would obviously not stack since it's a buff rather than an instant effect.

E.G. in your loop instead of
  • Unit - Order get_unit[2] to Orc Shaman - Bloodlust (Random unit from get_group[1])
  • set TargetUnit = (Random unit from get_group[1])
  • Unit - Order get_unit[2] to Orc Shaman - Bloodlust TargetUnit
  • Unit Group - Remove TargetUnit from get_group[2]
I tried this and it doesn't seem to make any difference, it just won't trigger some times. I have also tried the original triggers, straight out of the tutorial, and they seem to be inconsistent overall, specially the ones that use the random unit from group method.
 
Top