• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Trigger Help

Status
Not open for further replies.
Level 4
Joined
Dec 6, 2008
Messages
84
All I'm doing is instantly moving a dummy unit and ordering it to attack another dummy unit. It doesn't work: "Attack_Dummy" moves but doesn't attack.

  • Unit - Move Attack_Dummy[((Player number of (Owner of (Ordered unit)))] instantly to (Position of (Ordered unit)), facing (Facing of (Ordered unit)) degrees
  • Unit - Order Attack_Dummy[((Player number of (Owner of (Ordered unit)))] to Attack Attack_Dummy_Target[((Player number (Owner of (Ordered unit)))]
However, if I use "create Attack_Dummy at location of unit" and then order it to attack, it works, but I can't use this because I want to preserve Attack_Dummy's weapon cooldown. Any idea why this isn't working? It seems simple enough.
 
First part leaks of position. Copy whole trigger pls coz I cannot say what exactly is wrong... The most probadly is the position as I told. And remove the leaks.

I have this now:

  • Events
    • Unit - A unit is issued an order targeting a point
  • Conditions
    • (issued order) equal to (Order((attack + ground)))
  • Actions
    • Set Location_Hero = (Position of (Ordered unit)
    • Set Location_Attack_Ground = (Target point of issued order)
    • Unit - Kill Attack_Dummy_Target[(Player number of (Owner of (Ordered unit)))]
    • Unit - Create 1 Dummy Target for Neutral Passive at Location_Attack_Ground Facing of (Ordered unit)) degrees
    • Set Attack_Dummy_Target[(Player number of (Owner of (Ordered unit)))] = (Last created unit)
    • Unit - Move Attack_Dummy[((Player number of (Owner of (Ordered unit)))] instantly to Location_Hero, facing (Facing of (Ordered unit)) degrees
    • Unit - Order Attack_Dummy[((Player number of (Owner of (Ordered unit)))] to Attack Attack_Dummy_Target[((Player number (Owner of (Ordered unit)))]
    • Custom script: call RemoveLocation(udg_Location_Hero)
    • Custom script: call RemoveLocation(udg_Location_Attack_Ground)
It doesn't do anything =/ Should I create variables for the triggering unit and owner of triggering unit?
 
You need a wait between those two actions :/
E.g. Wait 0.3 seconds.
Else, use a timer, e.g.
Unit - Move Attack_Dummy
Set Timer1 = (Last started timer)
Countdown Timer - Start Timer1 as a one shot-timer that will expire in 0.01 seconds
...

Trigger2
Events
Timer - Timer1 expires
Conditions
Actions
Unit - Order Attack_Dummy to attack
Custom script: call DestroyTimer (udg_Timer1)
 
You need a wait between those two actions :/
E.g. Wait 0.3 seconds.
Else, use a timer, e.g.
Unit - Move Attack_Dummy
Set Timer1 = (Last started timer)
Countdown Timer - Start Timer1 as a one shot-timer that will expire in 0.01 seconds
...

Trigger2
Events
Timer - Timer1 expires
Conditions
Actions
Unit - Order Attack_Dummy to attack
Custom script: call DestroyTimer (udg_Timer1)

Oh, okay. The only thing is I would need 12 timer triggers to make that MUI.
 
Its the condition methinks. Remove that ugly + sign and throw "attack" and "ground" together and see what happens

That + sign is to indicate that they are concatenate strings. The condition is correct and works perfectly.
 
Ok then, expalin then, how I'm able to use "attackground" without conflict. Just because WE desn't flag it, doesn't mean theres a problem with it. If you try converting the action Unit - Issue unit to attack ground bla bla bla, it will turn out w/e the JASS action is, with yourunit,"attackground", bla bla bla.
 
Ok then, expalin then, how I'm able to use "attackground" without conflict. Just because WE desn't flag it, doesn't mean theres a problem with it. If you try converting the action Unit - Issue unit to attack ground bla bla bla, it will turn out w/e the JASS action is, with yourunit,"attackground", bla bla bla.

That's just how I've been told to do it, it doesn't matter.
 
Umm, I added a wait command of a few seconds just to test if the dummy would attack but it still doesn't.

I even removed the move order and it still didn't attack... You can't give attack orders to units that were created in a different trigger? I'm totally confused.
 
Last edited:
Don`t double posts before 48 hrs. Use
edit.gif
button.
 
Status
Not open for further replies.
Back
Top