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

[Trigger] Need Help with trigger

Status
Not open for further replies.
Level 1
Joined
Sep 8, 2008
Messages
2
Need help with my trigger. (GUI)
The trigger are supposed to give the caster 25% chance to instant kill a unit, and then bounce of to the next one.
The Bouncing Part won't work, and i don't know why. I hope that someone can help me.

Trigger part for instant kill:
  • Flintlock Gun of Piracy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Flintlock Gun of Piracy (500 DMG)
    • Actions
      • Set Flintlock_rand = (Random integer number between 1 and 20)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Flintlock_rand Less than or equal to 5
          • ((Target unit of ability being cast) is A Hero) Equal to False
        • Then - Actions
          • Set tempLoc = (Position of (Casting unit))
          • Unit - Create 1 Dummy Caster (Piracy Insta Kill) for (Owner of (Casting unit)) at tempLoc facing Default building facing degrees
          • Set Piracy_Dummy = (Last created unit)
          • Unit - Add a 3.00 second Generic expiration timer to Piracy_Dummy
          • Unit - Order Piracy_Dummy to Orc Far Seer - Chain Lightning (Target unit of ability being cast)
          • Custom script: call RemoveLocation( udg_tempLoc)
        • Else - Actions
Trigger Part for Bounce:
  • Flintlock Gun of Piracy bounce
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Flintlock Gun of Piracy (Instant KILL)
    • Actions
      • Set tempLoc = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy Caster (Piracy 500) for (Owner of (Casting unit)) at tempLoc facing Default building facing degrees
      • Set Piracy_Dummy2 = (Last created unit)
      • Custom script: call RemoveLocation( udg_tempLoc)
      • Unit Group - Pick every unit in (Random 1 units from (Units within 1000.00 of tempLoc)) and do (Actions)
        • Loop - Actions
          • Set tempLoc = (Position of (Picked unit))
          • Unit - Order Piracy_Dummy2 to Orc Far Seer - Chain Lightning (Picked unit)
      • Unit - Add a 5.00 second Generic expiration timer to Piracy_Dummy2
      • Custom script: call RemoveLocation( udg_tempLoc)
 
Last edited:
You removed the location before you picked every unit. You need to remove that useless set tempLoc in the picked units because it does nothing. Also you leaked a unit group, so before do a custom scrpit that says set bj_wantDestroyGroup = true. So Heres your new seconed trigger:
  • Flintlock Gun of Piracy bounce
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Flintlock Gun of Piracy (Instant KILL)
    • Actions
      • Set tempLoc = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy Caster (Piracy 500) for (Owner of (Casting unit)) at tempLoc facing Default building facing degrees
      • Set Piracy_Dummy2 = (Last created unit)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Random 1 units from (Units within 1000.00 of tempLoc)) and do (Actions)
        • Loop - Actions
          • Unit - Order Piracy_Dummy2 to Orc Far Seer - Chain Lightning (Picked unit)
      • Unit - Add a 5.00 second Generic expiration timer to Piracy_Dummy2
      • Custom script: call RemoveLocation( udg_tempLoc)
 
Level 1
Joined
Sep 8, 2008
Messages
2
Oh, seems that it still didn't want to work.
Still thanks for the help.
 
Last edited:
Well the only thing I can think of is a error in the object editor chain lightning. And you need to null the piracy dummys in the trigger. But make sure that the custom chain lightning costs no mana, and has tons of casting range and no casting time.
Also, set your dummy unit's cast backswing and the other thing to 0, that should reduse the delay.
 
Status
Not open for further replies.
Top