• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Cloud abilitiy affects allied units that are not Player 1

Status
Not open for further replies.
Level 5
Joined
Dec 25, 2018
Messages
110
I have ability which creates dummy who then casts cloud at target location, problem is that it affects allied units (DOESN'T target allied units if player 1 uses it)

Targets allowed are : Enemy, Ground

I found posts with similar problem but they just recommend triggering whole spell, any way to make this one work?

  • Actions
    • Set Caster = (Triggering unit)
    • Set tempLoc = (Target point of ability being cast)
    • Unit - Create 1 Dummy for (Owner of Caster) at tempLoc facing Default building facing degrees
    • Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
    • Unit - Add Cloud to (Last created unit)
    • Unit - Order (Last created unit) to Human Dragonhawk Rider - Cloud tempLoc
    • Custom script: call RemoveLocation (udg_tempLoc)
 
Level 24
Joined
Feb 9, 2009
Messages
1,783
whoops I had fragmented thoughts~!
  1. Cast "Cloud(mark II)" at an area that lasts for 8 seconds.
  2. have a dummy cast the modified silence it in the area whenever a unit enters without the corresponding buff.
  3. If a unit is with the corresponding buff is not in the area, remove the debuff.

    or
  1. Cast "Cloud(mark II)" at an area that lasts for 8 seconds.
  2. Create a dummy with slow aura modified to give a buff.
  3. Use Damage Engine to negate attacks from units with the buff.
  4. kill the dummy when the duration is up.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,496
Here's a triggered version of the ability.

How it works:
I use an ability based on Channel for the base ability. Then with triggers I check when a unit begins channeling the ability and add that unit to a Unit Group. Next I create a Dummy unit and add the Silence ability to it. After that I use a Unit Indexer and Array Variables to track the Dummy unit and Cast Point of the ability, linking these two variables to the casting unit. Finally, I turn on a timer that periodically Picks every unit in our Unit Group and orders the Dummy linked to the Picked Unit to cast Silence at it's stored Point. When the casting unit stops channeling the ability I remove the Dummy + Point and check if I need to turn off the timer.

I also added in some sound effect stuff. Sounds have always given me problems in GUI so I came up with this solution. What I do is order our Dummy to cast "sound" abilities which are abilities created solely for playing sound effects. So the Dummy casts Windwalk for Effect Sounds (Sounds that play once) and Locust Swarm for Effect Sounds Looping (Sounds that loop like Cloud). There's definitely a more elegant solution to this but I wanted to keep it GUI friendly.
 

Attachments

  • Cloud Ability Uncle.w3x
    25.7 KB · Views: 18
Last edited:
Status
Not open for further replies.
Top