Ability being cast from building.

B0ndo

New Member
Reaction score
4
I need a trigger that will make a dummy which will cast a custom ability 10 times in random locations in a region. Can someone help me?
 

Zakyath

Member
Reaction score
239
Trigger:
  • Actions
    • Unit - Create 1 Dummy for (Owner of (YourUnit)) at (YourPosition)) facing SomeDegree
    • Unit - Add a 15.00 second Generic expiration timer to (Last created unit)
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Unit Group - Pick every unit in (Units within 512.00 of (YourUnit)) matching (((Matching unit) belongs to an enemy of YourPlayer) Equal to True)) and do (Unit Group - Add (Picked unit) to (UnitGroup))
        • Unit - Order Unit to DoSomeSpell (Random unit from (Last created unit group))


You could, of course save all your units and variables etc. That should work, though.
 

B0ndo

New Member
Reaction score
4
Trigger:
  • Unit Group - Pick every unit in (Units within 512.00 of (YourUnit)) matching (((Matching unit) belongs to an enemy of YourPlayer) Equal to True)) and do (Unit Group - Add (Picked unit) to (UnitGroup))

What exactly will this do?
 

Zakyath

Member
Reaction score
239
What exactly will this do?

Picks all the units within a range of YourUnit (the building?) who are an enemy of the player in matter, you can exchange "YourPlayer" with "owner of YourUnit". And what it does with the picked units is to add them to a UnitGroup, so you know which units are nearby your building.
 

B0ndo

New Member
Reaction score
4
Okay thanks for your answer. But will this whole trigger do what i need?:
Send/train a desired spell from a building and then make this spell 10 times at random places in a region?

And how do i make a custom spell, that i can add to this trigger?
 

tjordell

New Member
Reaction score
7
Trigger:
  • Actions
    • Unit - Create 1 Dummy for (Owner of (YourUnit)) at (YourPosition)) facing SomeDegree
    • Unit - Add a 15.00 second Generic expiration timer to (Last created unit)
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Unit Group - Pick every unit in (Units within 512.00 of (YourUnit)) matching (((Matching unit) belongs to an enemy of YourPlayer) Equal to True)) and do (Unit Group - Add (Picked unit) to (UnitGroup))
        • Unit - Order Unit to DoSomeSpell (Random unit from (Last created unit group))


You could, of course save all your units and variables etc. That should work, though.

This is leaking.
Use variables for the group and use variables for the locations and after that, destroy it with theese
Trigger:
  • Actions
    • Custom Script : call DestroyGroup (udg_Your_Group)
    • Custom Script : call RemoveLocation (udg_Your_Location)
 
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