• 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.

[Trigger] finding closest unguarded Sheep?

Status
Not open for further replies.
Level 2
Joined
Sep 4, 2006
Messages
29
ok... i have this Wolf... that wanna go hunting every night... but i want it to attack the closest unguarded sheep to it's den... i saw a JASS code for finding closest unit (can't find it any more...)... but i understand nothing of JASS and i think it's a little harder anyway... so... anyone willing to help out? ^^;

Edit: ooh and... i'll like it all to not be JASS... ^^;
 
Last edited:
Level 2
Joined
Sep 4, 2006
Messages
29
http://wc3jass.com/viewtopic.php?t=2039

It's all explained in that tutorial.
i don't really wanna learn JASS... -_-

  • Find Closest Sheep
    • Events
      • Game - The in-game time of day becomes Equal to 20.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units owned by Neutral Passive of type Sheep)) Greater than or equal to 1
        • Then - Actions
          • Unit Group - Pick every unit in (Units of type Sheep) and do (Actions)
            • Loop - Actions
              • ?
        • Else - Actions
          • ?
 
Last edited:
Level 2
Joined
Sep 4, 2006
Messages
29
It is doable in GUI, just like I said if you have a lot of sheep it may lag while it is preformed. However, it is impossiable with out basic maths or JASS knowledge.
i am pretty good at math... ^^; but all this about Triggers leaking is... well... new... ^^; i am not that good at making a map... i mean... i end up starting on something new as soon as i end in a jam... ^^;

PS: sorry for double post ^^; i forgot... i am use to it being allowed everywhere o_O
 
Last edited:
Level 5
Joined
May 2, 2007
Messages
141
The protected sheep, are they in a feild or something, do they move around and stuff?

You could an aura called 'Protected Sheep' or something. . . then change its targets. . . use Ancient and then change your sheep to ancient. . .

Create a dummy unit with the aura and place it on your field(s).

Then use the trigger to find the closest cheep without the aura buff.

I hope you know what I mean. . . maybe I didn't explain it clear enough. . .
 
Level 2
Joined
Sep 4, 2006
Messages
29
The protected sheep, are they in a feild or something, do they move around and stuff?

You could an aura called 'Protected Sheep' or something. . . then change its targets. . . use Ancient and then change your sheep to ancient. . .

Create a dummy unit with the aura and place it on your field(s).

Then use the trigger to find the closest cheep without the aura buff.

I hope you know what I mean. . . maybe I didn't explain it clear enough. . .
great idea! ^^ thanks! ^^

now i just need to find out how to have it pick the closest unit... -_-
 
Last edited:
Status
Not open for further replies.
Top