• 🏆 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!

Custom trigger problems

Status
Not open for further replies.
Level 3
Joined
Mar 9, 2010
Messages
38
  • Recoil Chance
  • Events
  • Unit is Attacked
  • Conditions
  • Level of Recoil for Attacked unit Greater than 0
  • (Random integer number between 15 and 100) Equal to (15x(level of recoil for attacked unit)))
  • Actions
  • Unit-Create 1 Dummyunit for(owner of(attacked unit)) at Position of (Attacking unit)) facing default building facing degrees
  • unit- add a 1.50 generic expiration timer to(last created unit)
  • unit-add slow(dummyunit) to (last created unit)
  • Unit- Order(last created unit) to human sorceress- slow(attacking unit)
Supposedly there is a 15% chance that whoever attacks the unit with the Recoil skill will be damaged and slowed.. problem, when I did it, it failed to deploy.... what is the problem with the trigger?
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Well your second condition is wrong. If the unit is attacked a random number between 15 and 100 is picked. Now you make it if this random number is equal to 15. So at all you have a only a chance of 1 to 85 that this happen.

Try this trigger:
  • Test
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Acid Bomb for (Triggering unit)) Greater than or equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to ((Level of Acid Bomb for (Triggering unit)) x 15)
        • Then - Actions
          • Set TempPoint = (Position of (Triggering unit))
          • Unit - Create 1 Footman for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Slow to (Last created unit)
          • Unit - Order (Last created unit) to Human Sorceress - Slow (Attacking unit)
          • Custom script: call RemoveLocation(udg_TempPoint)
        • Else - Actions
Note:
Change Acid Bomb with your Recoil ability
Change Slow with your dummy ability
Change Footman to your dummy

Also you should check if the dummy ability has the correct settings .. no requirements ... which targets are allowed ... no mana cost ...
 
Status
Not open for further replies.
Top