Making the dummy cast the spell at the attacked unit in a diffrent Trigger??

excis

Member
Reaction score
1
Hi, I've tried to make a chance on hit spell that is based of chain lightning everytime u attack there is a chance you will cast chain lightning on the attacked unit
Trigger:
  • Pet attacks speed Copy
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Wolf
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 20) Equal to 20
        • Then - Actions
          • Trigger - Run Pet BS <gen> (checking conditions)
        • Else - Actions
          • Do nothing

Trigger:
  • Pet BS
    • Events
    • Conditions
    • Actions
      • Set Attacking_Unit = (Random unit from (Units of type Wolf))
      • Set Attacked_Unit = (Attacked unit)
      • Set TempUnit = (Random unit from (Units of type Beast Strenght Dummy))
      • Unit - Create 1 Beast Strenght Dummy for Player 1 (Red) at (Position of Attacking_Unit) facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Order TempUnit to Orc Far Seer - Chain Lightning Attacked_Unit
I have no idea to make the dummy check who is the attacked unit in the 2nd trigger (right now it's set to random unit just ignore that) Sorry if my triggers are all wrong :) im not really great :)
 

eclypt

New Member
Reaction score
4
Trigger:
  • Respawn Region 02
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 20) Equal to 20
        • Then - Actions
          • Set TempUnit01 = (Attacked Unit)
          • Set TempUnit02 = (Attacking Unit)
          • Set TempLoc01 = (Position of (Attacked Unit))
          • Trigger - Run Pet BS <gen> (ignoring conditions)
        • Else - Actions


Trigger:
  • Respawn Region 03
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 YourUnit for (Owner of (TempUnit01)) at Temp_Loc01 facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning No unit
      • Custom script: call RemoveLocation(udg_TempLoc01)
      • Set TempUnit01 = No Unit
      • Set TempUnit02 = No Unit
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
Trigger:
  • Respawn Region 02
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 20) Equal to 20
        • Then - Actions
          • Trigger - Run Pet BS <gen> (ignoring conditions)
        • Else - Actions


Trigger:
  • Respawn Region 03
    • Events
    • Conditions
    • Actions
      • Set TempUnit01 = (Attacked Unit)
      • Set TempUnit02 = (Attacking Unit)
      • Set TempLoc01 = (Position of (Attacked Unit))
      • Unit - Create 1 YourUnit for (Owner of (TempUnit01)) at Temp_Loc01 facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning TempUnit02
      • Custom script: call RemoveLocation(udg_TempLoc01)

you can have it this way as well without any problems.
 

canons200

New Member
Reaction score
50
why don't simple use the item ability orb of lightning (new)? It has the effect what you excatly want. Save trigger.
 
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