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

MUI? How to make it leakless with this?

Status
Not open for further replies.
Level 9
Joined
Mar 31, 2011
Messages
496
I made an attack system, is it in MUI? or just simple GUI?
I know how to make the trigger leakless but i dunno in this player number

--can someone edit this trigger? and post it here?
--known error on this:
*when i attack, the hero stops and after attacking goes away from enemy

  • Attack
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Attack
    • Actions
      • Set AttackLoc[(Player number of (Triggering player))] = (Position of (Triggering unit))
      • Set AttackGroup[(Player number of (Triggering player))] = (Units within 250.00 of AttackLoc[(Player number of (Triggering player))])
      • Unit - Order (Casting unit) to Stop
      • Animation - Play (Triggering unit)'s attack animation
      • Unit Group - Pick every unit in AttackGroup[(Player number of (Triggering player))] and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 5.00 damage of attack type Normal and damage type Normal
      • Custom script: call RemoveLocation(what will i put here?)
      • Custom script: call RemoveGroup?(what will i put here?)
 
Last edited:
Level 9
Joined
Mar 31, 2011
Messages
496
but i need it in multiplayer :cry: so players can attack the same time.

can you do that? please? thanks.
 
Level 11
Joined
Jun 20, 2009
Messages
880
Here's a fixed version of your trigger.

  • Attack
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Avatar
    • Actions
      • Set AttackLoc = (Position of (Triggering unit))
      • Unit - Order (Triggering unit) to Stop
      • Animation - Play (Triggering unit)'s attack animation
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 250.00 of AttackLoc) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 5.00 damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_AttackLoc)
 
Level 9
Joined
Mar 31, 2011
Messages
496
is that mui?

and i tried the trigger, the unit attacks, but after attacking it goes away from the enemy plus it damage it self :cry:
 
Last edited:
Level 11
Joined
Jun 20, 2009
Messages
880
If you dont want it do damage self or allies, add this:
  • Actions
    • Unit Group - Pick every unit in (Units within 512.00 of AttackLoc) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Picked unit) belongs to an ally of (Owner of (Triggering unit))) Equal to False
          • Then - Actions
            • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 5.00 damage of attack type Spells and damage type Normal
          • Else - Actions

And yes, its MUI, so it works on all units.
 
Status
Not open for further replies.
Top