• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] AoE Sleep

Status
Not open for further replies.
So I'm using the Channel ability to try to create an AoE sleep bomb.

Here's the trigger I'm using to try to make it work:
upload_2018-12-29_13-30-10.png

but I guess Channel doesn't apply buffs, so it's not working. I did also try making a unit group out of "Units in range of target point of ability being cast" but I guess that since it's an AoE ability, you can't get the target point either. What should I do here?
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
You can still get "Target point of the ability being cast" out of aoe abilities

Here's rough example (that would help a bit with leaks too!)

  • Set Variable - Loc = Target point of cast
  • Set Variable - Group = units in x range of Loc
  • Custom script: call DestroyGroup(udg_Group)
  • Unit Group - pick every unit in Group and do multiple actions
    • actions:
      • If and then else
        • If:
          • Boolean - if unit is alive
          • Boolean - if unit belongs to enemy of caster
          • Then:
            • Unit - Create 1 dummy for Caster at Loc
            • Unit - Add sleep
            • Unit - Set lvl of sleep to x
            • Unit - cast sleep on picked
            • Unit - add 0.50 sec expiration to dummy
          • Else:
            • Nothing
  • Custom script: call RemoveLocation(udg_Loc)

I also toyed with a DND Sleep equivalent if you are interested~
 
Last edited:
alright so here's what I have
upload_2018-12-29_16-12-43.png

and I know it was getting all the way through the trigger because I accidentally had it set to add the expiration timer to the triggering unit lol
but it's still not actually casting the ability (there's 0 cooldown and the dummy casters have more than enough mana to use the spell)
I'm thinking maybe it's because I based the casters off of a normal unit but the sleep ability they're trying to use is a hero spell? I dunno.
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
Create the dummy spell
set mana cost to 0
set cast time to 0
make sure the "is hero ability" is NOT ticked - if you are using a hero ability the dummy unit would need to be a hero with a skill point in it, best to make a seperate dummy ability

Oh and make sure the Dummy has no "Cast animation time" I don't have my editor on this computer but it's near the top and it's like "0.700" - if you can't find it just set the expiration to at least 1 second.

I'll come back later to let you know.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,894
Just make the ability that the dummy unit casts have 0 mana required, the dummy should have Art - Animation - Cast Backswing and Back Point as 0 value. That way your dummy unit can cast the ability as many times you want instantly. Why doesn't the dummy have the ability directly in object editor anyway?
 
Level 39
Joined
Feb 27, 2007
Messages
5,031
  • You never set the variable TmpCaster in the Pick loop.
  • You're picking units in range of Center of Playable Map Area not the target point.
  • Your Unit - Set Level line is backwards and is currently setting the caster's sleep to match the dummy.
  • The line where you order the dummy to cast tries to do it on the whole group; instead it should just be ordered to cast on Picked Unit, not the whole group.

As an aside: you can reuse TempPoint/TempGroup variables between triggers as long as none of the points/groups/whatever else are saved over a wait.
 
  • You never set the variable TmpCaster in the Pick loop.
  • You're picking units in range of Center of Playable Map Area not the target point.
  • Your Unit - Set Level line is backwards and is currently setting the caster's sleep to match the dummy.
  • The line where you order the dummy to cast tries to do it on the whole group; instead it should just be ordered to cast on Picked Unit, not the whole group.
As an aside: you can reuse TempPoint/TempGroup variables between triggers as long as none of the points/groups/whatever else are saved over a wait.
shit lol I really need to start proofreading my stuff more
or maybe just stop trying to work on maps right before bed lole
upload_2018-12-30_7-9-30.png

Fixed it all though, and everything is now working exactly as planned. Thanks to all of you! :ogre_love:
 
Status
Not open for further replies.
Top