Ability Help

Flamesword

New Member
Reaction score
0
I'm trying to make an ability that poisons targets within a radius of a unit. I used "Fan of Knives" as a base, and am trying to use a dummy unit to do the poison damage. I added "Envenomed Spears" to the dummy unit, and tried using this trigger to make him attack the targets, thereby adding the poison damage.

Events
Unit - Eco Knight begins casting an ability
Conditions
(Ability being cast) Equal to Nature's Wrath
Actions
Pick every unit in (Units within 400 of (Position of Eco Knight)) and do (Actions)
Loop - Actions
If - ((Picked Unit) belongs to an enemy of Player 7)
Then - Order Eco Knight Dummy to Attack Once (Picked Unit)
Else - Do nothing

I made my Dummy visible to see what he was doing during testing, but he doesn't attack anyone. I don't see any flaws in this trigger, or is there likely some effect I put in the dummy unit himself that keeps all of this from working the way I want to?

On a side note, I've noticed there is some way to add little windows to these messages that can properly display trigger text. Can anyone tell me how to do that too?
 

Zaraf

New Member
Reaction score
22
Not sure....but one way to check where your trigger might be getting stuck is to have messages displayed to you after every step. That way when you run the trigger, whatever messages you DO NOT see let you know where the trigger got stuck.
 

Flamesword

New Member
Reaction score
0
I've concluded that the order to attack the multiple targets seems to be too quick for the dummy unit to actually comply. Using Zaraf's tip showed the all parts of the triger are firing properly, but the dummy just isn't attacking. I removed locust and tried having him attack independantly of the trigger, and the poisoning effect is working properly, it's just that the trigger is telling him to attack too quickly for him to actually attack. Any ideas on this now?
 

Curo

Why am I still playing this game...?
Reaction score
109
Create a dummy for each individual unit so you have a different dummy attacking each one, and then they'll all get attacked at the same time.

Code:
And you can make Code window using Code tags (the # button above where you write your post).  Also you can use [CODE ] text [ /CODE] (without the spaces)

Code:
Your Spell
    Events
        Unit - Eco Knight <gen> Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Nature's Wrath
    Actions
        Set TempPoint = (Position of (Triggering unit))
        Unit Group - Pick every unit in (Units within 400.00 of TempPoint) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) belongs to an enemy of Player 7 (Green)) Equal to True
                    Then - Actions
                        Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
                        Unit - Order (Last created unit) to Attack Once (Picked unit)
                        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                    Else - Actions
        Custom script:   call RemoveLocation (udg_TempPoint)

And just make sure you give your dummy unit like 800 range and an appropriately-based projectile speed.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top