• 🏆 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!

Locust affecting triggers and abilities?

Status
Not open for further replies.
Level 7
Joined
Jan 17, 2019
Messages
163
Been dealing with a very unusual problem which I thought would be very simple. I need a small "Locust" unit that looks like the vine doodad to have a hide animation, and when it is triggered to be shown it will cast a super powered Bloodlust ability on itself so it looks like it grew out of the ground.

This works fine on my units if they do not have the locust ability.. but the second I add locust to them they do not respond to any of my triggers.

Any thoughts on what the problem is or how to work around it?
 
Locust units can't be targeted by spells.

They are also omitted from almost all "pick all units" etc triggers.

What you can do is save the unit to a variable, then increase its size and/or color through triggers.

Here's an example to make the size increase look smooth:

  • Vine Size
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Animation - Change Vine's size to (((Real(VineSize)) + 5.00)%, ((Real(VineSize)) + 5.00)%, ((Real(VineSize)) + 5.00)%) of its original size
      • Set VineSize = (VineSize + 1)
      • Wait 2.00 seconds
      • Trigger - Turn off (This trigger)
 
Last edited:
Level 28
Joined
Feb 18, 2014
Messages
3,579
Locust units can't be targeted by spells.
Actually, they can, if they are triggered. Locust units can't cast spells on themselves, best you can do is either create a dummy at the position of the locust unit and order it to cast the spell, or remove the locust ability with this script :
  • Set Caster = Shaman 0000 <gen>
  • Custom script : call UnitRemoveAbility(udg_Caster, 'Aloc' )
This is will make the locust unit able to cast spells on herself, but it will still act like locust, meaning it can't be targeted nor selected in-game.
 
Actually, they can, if they are triggered.

Surely not the normal way? I had to try it just to make sure, and it didn't work. Here's what I did:

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing 1 as An exact match
    • Conditions
    • Actions
      • Unit - Add Bloodlust (Neutral Hostile 1) to Mountain King 0004 <gen>
  • Untitled Trigger 001 Copy
    • Events
      • Player - Player 1 (Red) types a chat message containing 2 as An exact match
    • Conditions
    • Actions
      • Unit - Order Mountain King 0004 <gen> to Orc Shaman - Bloodlust Footman 0006 <gen>
Worked fine when the footman didn't have locust, but stopped working as soon as the footman had locust.
 
Status
Not open for further replies.
Top