Chance ability

Nenad4o

New Member
Reaction score
2
AreaBashP1

Code:
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Ancient Protector
        (Owner of (Attacking unit)) Equal to Player 1 (Red)
    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 BashPercent[1]
            Then - Actions
                Set TempPoint = (Position of (Attacked unit))
                Set TempUnit = (Units within 300.00 of TempPoint matching (((Owner of (Attacked unit)) Equal to Player 11 (Dark Green)) or ((Owner of (Attacked unit)) Equal to Player 12 (Brown))))
                Unit - Create 1 dummy for (Owner of (Attacking unit)) at TempPoint facing Default building facing degrees
                Unit Group - Pick every unit in TempUnit and do (Actions)
                    Loop - Actions
                        Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
                Custom script:   call RemoveLocation(udg_TempPoint)
                Custom script:   call DestroyGroup(udg_TempUnit)
            Else - Actions

Now i have one question.
When i select the tower that has this 15% ability chance, and constantly press s s s s s the ability occurs but there is no missile. I want to make the ability happens when the missile hits it's target. Just like critical strike on ranged unit. It happens when the missile hits the unit. How to do this? :confused::confused: plz help :)
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
first of all, you havent got to set a unit group, you havent got to destroy the unit group (because you dont set it) and you havent got to pick all units within the group, the skill your dummy is supposed to use is an AoE spell it ll effect all units within range anyway...

for your question, use either unit is damaged, (which got to be set by another trigger) or get the speed of your missle, the range between your tower and your target and add a wait inside with the calculated time your missle will need. But i wont recommand to do it because that wont be MUI. if more as 1 tower is attacking them it could be that the first one wont trigger.
 

Nenad4o

New Member
Reaction score
2
it's ok, i fixed it somehow :)
i replaced the unit with a same unit whenever someone presses s or stop.
 
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