1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Locust affecting triggers and abilities?

Discussion in 'Triggers & Scripts' started by NecroVirus, Jul 18, 2019.

  1. NecroVirus

    NecroVirus

    Joined:
    Jan 17, 2019
    Messages:
    66
    Resources:
    0
    Resources:
    0
    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?
     
  2. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    546
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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: Jul 20, 2019
  3. Warseeker

    Warseeker

    Joined:
    Feb 18, 2014
    Messages:
    2,549
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.
     
  4. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    546
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.
     
  5. Ceday

    Ceday

    Joined:
    Feb 22, 2010
    Messages:
    1,077
    Resources:
    0
    Resources:
    0
    They can be picked via "pick units of player", but not pick units in range or region.
     
  6. NecroVirus

    NecroVirus

    Joined:
    Jan 17, 2019
    Messages:
    66
    Resources:
    0
    Resources:
    0
    I'm liking the looks of these triggers, def gonna experiment when I get home from work!
     
  7. NecroVirus

    NecroVirus

    Joined:
    Jan 17, 2019
    Messages:
    66
    Resources:
    0
    Resources:
    0
    Yooo Warseeker your custom script idea did the job! It's working! This is gonna look so cool when finished, thanks!
     
  8. doom_sheep

    doom_sheep

    Joined:
    Oct 18, 2008
    Messages:
    756
    Resources:
    0
    Resources:
    0
    its a good idea to make a trigger that just adds every unit to a unit group variable when they enter the map for shit like this
     
  9. NecroVirus

    NecroVirus

    Joined:
    Jan 17, 2019
    Messages:
    66
    Resources:
    0
    Resources:
    0
    Ya know I gotta admit that would probably have been the easier route. Still new to variables, hell I've been using this janky ass invisible island on my map to hide/store complex units