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

Dummy spawn, cast ability & follow.

Status
Not open for further replies.
Level 4
Joined
Dec 15, 2007
Messages
96
Ey,
Attempted to create a dummy unit which is suppose to use a Locust Swarm ability and follow a unit around with the Locust Swarm active, however the results were very disappointing xP

My dummy spawned, but did not use Locust swarm, and did not show any attempts to be following any units at all. I must admit this is not my strongest point, these fancy trixy triggers, but well. Here's my lazy piece of work:p


  • Spawn01
    • Events
      • Player - Player 1 (Red)'s Current lumber becomes Less than or equal to 20.00
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Create 1 Dummy for Player 9 (Gray) at (Position of Craig 0008 <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to LocustUnitGroup
      • Unit - Order (Last created unit) to Undead Crypt Lord - Locust Swarm
      • Unit - Order (Last created unit) to Right-Click Craig 0008 <gen>
Any ideas how to get this working properly?

thanks.
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
first things to check are, enough mana? i guess yes, changed it to unit ability? removed level requirements? dummy has ability?

if its none of that its maybe because locust swarm has a casting time and you directly order the unit to follow, so maybe it gets interrupted?
 
Level 25
Joined
Apr 27, 2008
Messages
2,512
1- putt turn off last
2- make sure dummy have ability else add ability
3-mana cost= 0
4-make another trigger: -events:every 1 sec
-actions:eek:rder last created unit to right click
5-for the locust you can make a 3rd trigger:
-events:a unit enter entire map
-condition:unit type of entering unit equal to Dummy
-actions:eek:rder entering unit to Undead Crypt Lord - Locust Swarm
6-good luck
 
Level 4
Joined
Dec 15, 2007
Messages
96
How silly>.< Just figured what was causing the problem..

The dummy was getting interupted by the 'right-clicking' trigger, which was why it did not use its Locust Swarm ability. I tried giving the dummy 1 sec to cast before I ordered it to follow, but then it completely refused to follow. After long hard thinking and many testings I discovered that my dummy was blind xP I had turned its day/night vision to 0, so it was not able to see the unit it had to be following.
Now it works perfectly well, I suppose.
Thanks alot.

Btw, Is there any tricky leaks here in this trigger now? I've remade my trigger alot to figure a way to get it working, so now it looks something like this:

(Got one spawn trigger for each 4 different dummys at different amount of lumber)
  • Spawn00
    • Events
      • Player - Player 1 (Red)'s Current lumber becomes Less than or equal to 20.00
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Create 1 Dummy for Player 9 (Gray) at (Position of Craig 0008 <gen>) facing Default building facing degrees
      • Set LocustCastingDummys[0] = (Last created unit)
      • Unit Group - Add LocustCastingDummys[0] to LocustUnitGroup
      • Unit - Order LocustCstingDummys[0] to Undead Crypt Lord - Locust Swarm
      • Wait 1.00 seconds
      • Trigger - Turn on Dummy Check Follow <gen>
(One very own follow checking trigger for each dummy)
  • Dummy Check Follow
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Order LocustCastingDummys[0] to Right-Click Craig 0008 <gen>
(Shorted this one so its only involving Dummy 0)
  • Despawns
    • Events
      • Player - Player 1 (Red)'s Current lumber becomes Greater than 20.00
    • Conditions
      • (LocustUnitGroup is empty) Not equal to True
    • Actions
      • Unit Group - Pick every unit in LocustUnitGroup and do (Unit - Remove (Picked unit) from the game)
      • Set LocustCastingDummys[0] = No unit
      • Trigger - Turn on Spawn00 <gen>
      • Trigger - Turn off Dummy Check Follow <gen>
 
Status
Not open for further replies.
Top