• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

"Picked Unit" Function Is Not Working ???

Status
Not open for further replies.
Level 3
Joined
Sep 10, 2005
Messages
23
I HAVE A QUESTION ABOUT THIS TRIGGER...
A HAVE MARKED BY UNDERLINE MY PROBLEM
UNDERLINED FUNCTIONS ARE NOT WORKING... BUT WHY ??? I AM GETTING CRAZY...

Blood Raven Effect 2
Events
Unit - A unit Dies
Conditions
(Unit-type of (Dying unit)) Equal to Blood Raven (Level 12)
Actions
Unit Group - Pick every unit in (Random 1 units from (Units within 1000.00 of (Position of (Dying unit)) matching ((Unit-type of (Matching unit)) Equal to Zombie (Level 4)))) and do (Actions)
Loop - Actions
Lightning - Create a lightning effect Chain Lightning - Primary (Position of (Dying unit)) (Position of (Picked unit))
Set BloodRavenLigtning = (Last created lightning effect)
Wait 0.05 seconds
Unit - Kill (Picked unit)
Lightning - Destroy BloodRavenLigtning
Wait 0.10 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units within 1000.00 of (Position of (Dying unit)) matching ((Unit-type of (Matching unit)) Equal to Zombie (Level 4)))) Greater than or equal to 1
Then - Actions
Trigger - Run (This trigger) (ignoring conditions)
Else - Actions
Do nothing

I HAVE A QUESTION ABOUT THIS TRIGGER...
A HAVE MARKED BY UNDERLINE MY PROBLEM
UNDERLINED FUNCTIONS ARE NOT WORKING... BUT WHY ??? I AM GETTING CRAZY...
 
And I guess wait's do not work properly within any kind of loop. You should try a pick and a loop:

Experience TRIGGER TAGS! From the same creator than Jass tags and many more things!
  • Actions
    • Set x = 0
    • Unit Group - Pick every unit in (there) and do (Actions)
      • Loop - Actions
        • Lightning - Create
        • Set Lightning[x] = Last Created Lightning
        • Set Unit[x] = (Picked Unit)
        • Set x = x + 1
    • Wait 0.05 seconds
    • For each integer (Integer A) from 0 to x do (Actions)
      • Loop - Actions
        • Lightning - Destroy Lightning[(Integer A)]
        • Unit - Kill Unit[(Integer A)]
This is the only way I see to get it to work properly =P
But maybe it's just any other problem I don't see now xD
 
Status
Not open for further replies.
Top