• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

"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...
 
Level 7
Joined
Dec 31, 2005
Messages
712
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