• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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