ability problem (trigger)

MicroSheep

New Member
Reaction score
3
okay so im not very new to maps making, i been doing it for a while now.

Im currently making an angel arena, and doing Naruto as a character.

Now i figured that you had to create a dummy and make it use wand of illusion on the main unit to create more then the maximum 9 clones, however for some reason, the number of illusions varies from the amount of dummies to no illusions made at all.

thanks

Trigger:
  • Shadow Clone Jutsu
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Clone Jutsu
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Shadow Clone Jutsu for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Create 14 Dummy for Player 1 (Red) at (Position of (Triggering unit)) facing Default building facing degrees
          • Unit Group - Pick every unit in (Units of type Dummy) and do (Actions)
            • Loop - Actions
              • Unit Group - Add (Picked unit) to Dummygroup
          • Unit Group - Pick every unit in Dummygroup and do (Actions)
            • Loop - Actions
              • Hero - Create Wand of Illusion and give it to (Picked unit)
              • Hero - Order (Picked unit) to use (Last created item) on (Casting unit)
          • Wait 1.00 seconds
          • Unit Group - Pick every unit in (Random 1 units from (Units owned by (Owner of (Triggering unit)) matching (((Matching unit) is an illusion) Equal to True))) and do (Actions)
            • Loop - Actions
              • Set Position[0] = (Position of (Picked unit))
              • Set Position[1] = (Position of (Triggering unit))
              • Unit - Move (Triggering unit) instantly to Position[0]
              • Unit - Move (Picked unit) instantly to Position[1]
          • Unit Group - Pick every unit in Dummygroup and do (Unit - Remove (Picked unit) from the game)
          • Unit Group - Remove all units from Dummygroup
        • Else - Actions
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Trigger:
  • Shadow Clone Jutsu
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Clone Jutsu
    • Actions
      • Set TempPoint = Position of (Casting Unit)
      • Set TempUnit = Casting Unit
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Shadow Clone Jutsu for (Triggering unit)) Equal to 1
        • Then - Actions
          • For each (Integer A) from 1 to 14, do (Actions)
            • Loop - Actions
            • Unit - Create 1 Dummy for Player 1 (Red) at TempPoint facing Default building facing degrees
            • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
            • Hero - Create Wand of Illusion and give it to (Last created unit)
            • Hero - Order (Last created unit) to use (Last created item) on (Casting unit)
    • Wait 1.00 seconds
    • Set TempGroup = (Random 1 units from (Units owned by (Owner of (Triggering unit)) matching (((Matching unit) is an illusion) Equal to True))) and do (Actions)
    • Unit Group - Pick every unit in TempGroup and do Actions
      • Loop - Actions
        • Set TempPoint2=(Position of (picked unit))
        • Set Position[0] = TempPoint2
        • Set Position[1] = TempPoint
        • Unit - Move TempUnit instantly to Position[0]
        • Unit - Move (Picked unit) instantly to Position[1]
    • Custom script: call DestroyGroup(udg_TempGroup)
    • Custom script: call RemoveLocation(udg_TempPoint2)
    • Custom script: call RemoveLocation(udg_TempPoint)


Except that last part this should severely clean up your trigger, and probably make it work. What does the last part do?
 

MicroSheep

New Member
Reaction score
3
since its an angel arena and your versing other players, i didnt base the move off mirror image so i wanted the main unit to be swapped with a clone to confused the enemy,
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Edited the post above, see if it works now ^^

And sorry, it's a freehand edit, no wc3 >.<
 

crazyfanatic

New Member
Reaction score
20
I have 2 siggestions to make this trigger better:
1. Instead of giving the item to a dummy, isnt it better to add the unit the Wand of illusion ability from object editor?
2. Why dont you use Starts the effect of an ability instead of Starts casting the ability? The event you use can be cheated by clicking the ability, then issuing move or whatever, and this way you can get infinite amounts of illusions.
 

Murre

New Member
Reaction score
14
Trigger:
  • Shadow Clone Jutsu
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Clone Jutsu
    • Actions
      • Set TempPoint = Position of (Triggering Unit)
      • Set TempUnit = Triggering Unit
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Shadow Clone Jutsu for (TempUnit) Equal to 1
        • Then - Actions
          • For each (Integer A) from 1 to 14, do (Actions)
            • Loop - Actions
            • Unit - Create 1 Dummy for owner of (TempUnit) at TempPoint facing Default building facing degrees
            • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
            • Hero - Create Wand of Illusion and give it to (Last created unit)
            • Hero - Order (Last created unit) to use (Last created item) on (TempUnit)
    • Wait 1.00 seconds
    • Set TempGroup = (Random 1 units from (Units owned by (Owner of (Triggering unit)) matching (((Matching unit) is an illusion) Equal to True))) and do (Actions)
    • Unit Group - Pick every unit in TempGroup and do Actions
      • Loop - Actions
        • Set TempPoint2=(Position of (picked unit))
        • Set Position[0] = TempPoint2
        • Set Position[1] = TempPoint
        • Unit - Move TempUnit instantly to Position[0]
        • Unit - Move (Picked unit) instantly to Position[1]
    • Custom script: call DestroyGroup(udg_TempGroup)
    • Custom script: call RemoveLocation(udg_TempPoint2)
    • Custom script: call RemoveLocation(udg_TempPoint)


Just fixed some minor things. :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top