Dummy isnt casting Shadow Strike

Roku

New Member
Reaction score
3
Recently i have a lot of problems with dummies, which i didnt have before in my previous maps. Well anyways...

I have this trigger that fires once every 15 seconds and it should cast Shadow Strike on every unit in a certain region/range of another unit, it doesnt matter, since everything is happening inside this small arena surrounded with walls. So i order my dummy to cast the spell and he doesnt! I gave visibility over the whole map to Player 12 (the computer who should be casting), removed the mana cost from the spell, set max cast range, and basically checked everything that could be wrong, still it isn't working. Here is my trigger:

Code:
Natures Fury
    Events
        Time - Every 15.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in Boss Fight Area <gen>) and do (Actions)
            Loop - Actions
                Unit - Create 1 dummy for Player 12 (Brown) at (Position of Boss) facing 0.00 degrees
                Unit - Add Nature's Fury  to (Last created unit)
                Unit - Set level of Nature's Fury  for (Last created unit) to 1
                Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Floating Text - Create floating text that reads Nature's Fury! at (Position of Boss) with Z offset 120.00, using font size 10.00, color (10.00%, 100.00%, 10.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 20.00 towards 90.00 degrees
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds

The unit filtering in the 'Pick every unit' is simplified, just to show that it's not because of that. It may be some game mechanic that im not aware of (as i've already came across some of these recently) that prevents this from working or maybe i missed something, i dont know. Ignore the leaks.
 

Roku

New Member
Reaction score
3
Sorry, i forgot to mention, 'Boss' is a unit variable, he is supposed to be fighting the target of the shadow strike. Just in case, i used this variable several times in other triggers with no prob, if you might be wandering.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Add this in your code:

Code:
Custom Script: call BJDebugMsg(GetUnitName(udg_Boss))

If it displays (null), then your variable is the problem. If it on the other hand displays the name of the unit stored in the variable Boss, your code is the problem.
 

Manix

Well-Known Member
Reaction score
29
I don't mean to be rude, but your trigger has some leaks, assuming that the trigger runs every 15 sec, you should check the memory leak tutorial

Code:
Natures Fury
    Events
        Time - Every 15.00 seconds of game time
    Conditions
    Actions
        [COLOR="Red"]Unit Group - Pick every unit in (Units in Boss Fight Area <gen>) and do (Actions)[/COLOR]
            Loop - Actions
                Unit - Create 1 dummy for Player 12 (Brown) at [COLOR="red"](Position of Boss)[/COLOR] facing 0.00 degrees
                Unit - Add Nature's Fury  to (Last created unit)
                Unit - Set level of Nature's Fury  for (Last created unit) to 1
                Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike (Picked unit)
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Floating Text - Create floating text that reads Nature's Fury! at [COLOR="red"](Position of Boss)[/COLOR] with Z offset 120.00, using font size 10.00, color (10.00%, 100.00%, 10.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 20.00 towards 90.00 degrees
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
 

thewrongvine

The Evolved Panda Commandant
Reaction score
506
Is there more than 1 person? How would 1 dummy shadow strike more than 1 unit at the same time?
 

Roku

New Member
Reaction score
3
Oh come on guys, please read what i am posting. I know there are leaks and i dont care, thats not the problem. I'll fix them later but what's the point in it if the trigger isnt working. Thanks for the checking the boss variable suggestion, but as i said i use this all over the map in almost every trigger and i can't be more sure that it's nothing wrong with that. Yes the code is the problem. I can't find this problem. Now if anyone can, help me please :)

EDIT: To thewrongvine, i didnt see your post when writing mine, well i've done this before with some Mass Entangling Roots spell of mine, the creation of the dummy is inside the pick every unit group, so i guess it should create 1 dummy for every unit in the group, as it did with the other spell of mine. You can check some tutorials, where this is the way how multi-target abilities are done, well just in case i will check if that's the prob, although as i recall the trigger wasn't working when i had only 1 hero in the region either.
 

Manix

Well-Known Member
Reaction score
29
Oh ok.. I don't really find any problem but try removing that line:

Code:
                Unit - Set level of Nature's Fury  for (Last created unit) to 1

It's pointless, also make sure that your ability "nature's fury" is based on shadow bolt, I don't know why but i got a feeling it's not, 6th sense..
 

vypur85

Hibernate
Reaction score
803
Unhide or give the dummy a visible model. See if they spawn every 15 seconds. Let them have longer expiration time for you to check the spawned units. If they don't cast, try selecting them and cast manually. This way, you can know that the problem lies within Object Editor or Trigger. Troubleshoot and trial and error.

Some things to think of:
1. The Boss variable as mentioned.
2. Any pickable units in Boss Fight Area <gen>?
3. Are the pickable units magic resistant?
4. Have you checked 'Targets allowed'?
5. Can the dummy manually cast the spell?

Anyway, the trigger seems fine to me...

Also, 3 leaks every 15 seconds are just minor leak. Won't cause lag. :p

Edit:
One more thing, I just remembered something. Try changing Player 12 (Brown) to Player 1 (Red) and see whether if it casts. Not sure why, but I've had problem with computer players not casting spells in the past. Not sure what's the reason and how to repair it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top