• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Passive "Locust Swarm" ability

Status
Not open for further replies.
Level 3
Joined
Feb 15, 2015
Messages
26
Hi there! I need to trigger a passive skill that does the following:

1. When the hero learns it, it spawns an uncontrollable, invulnerable bird that follows him. Leveling up upgrades the bird, not creates a new one.

2. Every x seconds, the bird will attack the target that the hero is attacking. After finishing the attack, the bird returns to the hero's current position and continues to follow him.

3. The bird exists until the hero dies. When the hero revives, the bird revives too and follows him like usual

Hope my description is clear enough. I don't sure if this spell can be done in GUI/MUI but please tell me how to do it if it can be.
 
Level 12
Joined
Nov 3, 2013
Messages
989
It should be possible to just make a flying unit and give it the ability "Locust" (this is what make units invulnerable, no collision, and make them untargetable & unselectable—just like the locusts from locust swarm).



Here's some real shitty mock-up I made for what the triggers would kinda look like in GUI:

  • Untitled Trigger 005
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Name of your Ability
    • Actions
      • set unitVariableSummoner = (Triggering Unit)
      • set tempPoint = (position of unitVariableSummoner)
      • Unit - Create 1 Bird Follower for (Triggering Player)) at tempPoint facing Default building facing degrees
      • set unitVariableSummon = (Last created unit)
      • Unit - Order unitVariable to Follow (Triggering unit)
      • custom script: call RemoveLocation( udg_tempPoint )
  • Untitled Trigger 006
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • attacking unit Equal to unitVariableSummoner
        • Then - Actions
          • set targetAttackedUnit = (Triggering unit) //i.e. the unit that last got attacked
  • Untitled Trigger 007
    • Events
      • Time - Elapsed game time is 0.05 seconds
    • Conditions
    • Actions
      • Set attackDelay = (attackDelay + 0.05)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • attackDelay Greater than or equal to 3.00
          • Then - Actions
            • Unit - Order unitVariableSummon to Attack Once targetUnit
          • Else - Actions
And you can probably figure out the rest... Honestly I see 2 problems here, 1st you obviously have to make the variables into arrays so there's one variable for each player or MUI with dynamic indexing or w/e.

Then the 2nd problem is detecting when the bird has attacked to re-order it to follow the summoner unit again. (Either use a DDS, or honestly, just slap on a wait or something, it shouldn't matter unless it's supposed to attack very frequently.)

Also, when the summoner dies, just use
  • Unit - Hide No unit
then
  • Unit - Unhide No unit
and teleport it to the summoner unit when the summoner is revived.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
This may give you an idea what's possible with just object editor-ing. You can change the attack delay in the phoenix unit or in some of the locust data fields, but the actual rate I get seems to not be too consistent, you'll need to experiment. Damage is determined by phoenix attack. If you set the damage return or healing return to 0 the phoenix doesn't attack.

Level 1 of the spell has 5s duration
Level 2 has 9999 duration

If you want it to be truly permanent and not heal the hero, I would suggest you put the ability on a dummy that you constantly move to the location of the hero with the phoenix every, say 0.5s. Otherwise the hero will need to recast their phoenix ability every time it gets disabled.
 

Attachments

  • teeest.w3x
    21.4 KB · Views: 41
Level 3
Joined
Feb 15, 2015
Messages
26
This may give you an idea what's possible with just object editor-ing. You can change the attack delay in the phoenix unit or in some of the locust data fields, but the actual rate I get seems to not be too consistent, you'll need to experiment. Damage is determined by phoenix attack. If you set the damage return or healing return to 0 the phoenix doesn't attack.

Level 1 of the spell has 5s duration
Level 2 has 9999 duration

If you want it to be truly permanent and not heal the hero, I would suggest you put the ability on a dummy that you constantly move to the location of the hero with the phoenix every, say 0.5s. Otherwise the hero will need to recast their phoenix ability every time it gets disabled.

The bird kinda moves awkwardly, flying in different positions and is very slow to turn even though I reduced the turn rate together. My idea is the bird always follow the direction that is the same as the facing of the possessed hero (A). It only changes direction when it attacks a target and return to the hero, in a direction which is opposite to the hero's facing (B). Long story shorts, if the bird is not attack, it moves in direction (A). If it just attacked the target, it returns to the hero in direction (B)
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
There's an OE field that changes the leash range on the phoenix. I believe I set it to 800 or 200 for testing in that map. That may affect its behavior; you can also try acquisition range and attack range for the phoenix or either of the settings in locust swarm that affect how long the swarming units delay at the hero.
I reduced the turn rate
Reducing turn rate makes it turn slower. You want to increase that to make it turn faster. In general, though, this bird is not just going to sit still on the hero's shoulder, that's not what locusts are coded to do. Perhaps something to look into would be the Blood Mage's "sphere" ability, which makes the chosen sfx orbit his head and fire with his spells/autoattacks.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Blood Mage's "sphere" ability, which makes the chosen sfx orbit his head and fire with his spells/autoattacks.
That's just the model though, there's 3 attachment points that move around him. The sphere ability itself doesn't really do anything afaik, at least nothing about the part where the orbs spin around him.
 
Level 12
Joined
Nov 3, 2013
Messages
989
@FallenAngel1999 So I made a test map for it, basically fully in GUI except that without a DDS or blizzards new damage event native (is it jass only? I couldn't find it, and I've only got the regular world editor for 1.29) so I had to do some fuckery with attack event & wait, which is a real pain in the ass if you're using global variables, so I cheated a bit with custom script to make some local variables there, but it should still be simple and easy.

I made the hawk (summon) simply follow Rexxar (summoner) while it's not attacking, tbh it looks not that great, but it could be improved by reducing the follow range.

Otherwise, what you could do is make a trigger that check for issued orders targeting a unit or a point by the summoner, and order the hawk companion/pet to move there, unless it's current order is already to attack.

That way it won't just follow after but rather go with, or maybe even in front, of the summoner (if it has high enough movespeed), which is much more fitting than simply following behind imo.

You should be able to do it quite easily following the templates of the other triggers if you want.


Also, it's MUI, but I got a bit lazy with it, and to be honest I don't think there's going to be any point to de-index. Maybe if there's going to be more than one companion for a single beastmaster/summoner?

Anyway, so I didn't complete it, but it's still MUI. You just can't have add thousands of rexxars, then delete them, and add new ones. It could potentially be a problem if there's some kind of repick system on an RPG map or such and for some reason you constantly repick, cast the ability, then repick again (and repeat.)


I think I noticed the hawks acting a bit strangely after I ordered to attack another hawk, but any issue went away by just re-casting the summon ability. A bit lazy... But it's quite annoying to have to deal with global variables for everything so I'm lazy.



Oh and before I forget why I even made this post... (p.s. used regular world editor 1.29, I can't remember if I used any new natives or anything, the whole point was to use the new damage event but I couldn't find it, so I'm assuming it should still work with earlier versions of wc3...)
 

Attachments

  • hawk companion.w3x
    28.4 KB · Views: 53
Level 45
Joined
Feb 27, 2007
Messages
5,578
blizzards new damage event native
Afaik they are only available on the PTR World Editor and will be released with the 1.30 development update. For now they're not in the game yet and I'm not sure if GUI will get interfaces to access them them. @Kam would know.


To make this a passive ability just give the hero something like Devotion Aura with a +0 bonus and targets set to "alive, allied, ground, flying, self" (might have to add water targeting if your hero is amphibious) with a range of like 5.0 so it only affects the hero. Change the buff however you like and boom, just have the hero learn and level up that dummy passive skill. If you don't want any buff to show up use Bash as the passive instead (unless that can interrupt channels even with 0% proc chance).
 
Status
Not open for further replies.
Top