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

Help with Locust ability

Status
Not open for further replies.
Level 6
Joined
Aug 12, 2007
Messages
38
Are you units with locusts considered in the boolean category of "units with matching buff - invulnerability"?

If not will adding invulnerability to them and locust mess things up?

I have a trigger that pushes around units within range and I dont want these dummies that have locust effected by it. And there is no trigger that look for units with a certain ability, only buff.

Thank you
 
Level 6
Joined
Aug 12, 2007
Messages
38
They are being moved around, and theyre initiallized in a variable that makes sure it doesnt have invulnerability buff, then it moves the units in that group after picking them. So locusts do get selected... at least in my case.

So should I just add invulnerability to those units?

Edit: Just noticed my variable didnt have the "has invulnerability buff" condition within. Will test to see if this rids the problem.
 
Last edited by a moderator:
Level 33
Joined
Mar 27, 2008
Messages
8,035
Can you show us the triggers where it can move the Locust ?
Not unless it's part of the spell.

If just this action;
  • Unit Group - Pick every unit in (Units within 600.00 of (Position of (Triggering unit))) and do (Actions)
    • Loop - Actions
Units that have Locust won't be ever picked by that function.
 
Level 6
Joined
Aug 12, 2007
Messages
38
An effect is created to simulate grinding against the earth when the unit is moved. A bunch of these occur when a certain unit triggers this onto an area with a bunch of locust units. If they are being moved or not can be questioned. Either way it is still picking these units and adding the effect on their positions, as long as they are within range. The point may be moot given that I did not have the condition checking for invulnerability, which I thought I did. I've added that condition now, and it should in theory not count locust units since they are technically invulnerable. So to simplify things, answering a yes or no to
"are locust units considered units with buff - invulnerable?"

I appreciate your help though with this anomaly.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Worst comes to worst, try this;
  • Actions
    • Set TempLoc = (Position of (Triggering unit))
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units within 600.00 of TempLoc) and do (Actions)
      • Loop - Actions
        • Set TempUnit = (Picked unit)
        • Custom script: if GetUnitAbilityLevel(udg_TempUnit, 'Aloc') > 0 then
        • -------- THIS IS LOCUST UNIT --------
        • Custom script: else
        • -------- THIS IS NOT LOCUST UNIT --------
        • Custom script: endif
    • Custom script: call RemoveLocation(udg_TempLoc)
You should do action inside the "THIS IS NOT LOCUST UNIT" comment section.
 
Status
Not open for further replies.
Top