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

Aim player

Status
Not open for further replies.
Level 7
Joined
Feb 28, 2014
Messages
185
How i make my Unit(kodo) chase the prey(Runner) via looping ?Just when the game start , make the kodo find out runner and attack them as fast as possible .I wonder how to make it work . Someone help please :ogre_rage:.
Trigger below made by me
  • Kodo Chase Runner
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Base[1] = Base 1 <gen>
      • Set Base[2] = Base 2 <gen>
      • Set Base[3] = Base 3 <gen>
      • Set Base[4] = Base 4 <gen>
      • Set Base[5] = Base 5 <gen>
      • Set Base[6] = Base 6 <gen>
      • Set Base[7] = Base 7 <gen>
      • Set Base[8] = Base 8 <gen>
      • Set Base[9] = Base 9 <gen>
      • Set Base[10] = Base 10 <gen>
      • Set Base[11] = Base 11 <gen>
      • Set Base[12] = Base 12 <gen>
      • Set Base[13] = Base 13 <gen>
      • Set Base[14] = Base 14 <gen>
      • Set Base[15] = Base 15 <gen>
      • Set Base[16] = Base 16 <gen>
      • Set Base[17] = Base 17 <gen>
      • Set Base[18] = Base 18 <gen>
      • Set Base[19] = Base 19 <gen>
      • Set Base[20] = Base 20 <gen>
      • Set Base[21] = Base 21 <gen>
      • Set Base[22] = Base 22 <gen>
      • Set Base[23] = Base 23 <gen>
      • Set Base[24] = Base 24 <gen>
      • Set Base[25] = Base 25 <gen>
      • Set Base[26] = Base 26 <gen>
      • Set Base[27] = Base 27 <gen>
      • Set Base[28] = Base 28 <gen>
      • Set Base[29] = Base 29 <gen>
      • Set Base[30] = Base 30 <gen>
      • Set Base[31] = Base 31 <gen>
      • Set Base[32] = Base 32 <gen>
      • Set Base[33] = Base 33 <gen>
      • Set Base[34] = Base 34 <gen>
      • Set Base[35] = Base 35 <gen>
      • Set Base[36] = Base 36 <gen>
      • Set Base[37] = Base 37 <gen>
      • Set Base[38] = Base 38 <gen>
      • Set Base[39] = Base 39 <gen>
      • Set Base[40] = Base 40 <gen>
      • Set Base[41] = Base 41 <gen>
      • Set Base[42] = Base 42 <gen>
      • Set Base[43] = Base 43 <gen>
      • Set Base[44] = Base 44 <gen>
      • Set Base[45] = Base 45 <gen>
      • Set Base[46] = Base 46 <gen>
      • Set Base[47] = Base 47 <gen>
      • Set Base[48] = Base 48 <gen>
      • For each (Integer A) from 1 to 48, do (Actions)
        • Loop - Actions
          • Set AllBase[1] = (Base[(Integer A)] contains (Random unit from (Units owned by Player 1 (Red))))
          • Set AllBase[2] = (Base[(Integer A)] contains (Random unit from (Units owned by Player 2 (Blue))))
          • Set AllBase[3] = (Base[(Integer A)] contains (Random unit from (Units owned by Player 3 (Teal))))
          • Set AllBase[4] = (Base[(Integer A)] contains (Random unit from (Units owned by Player 4 (Purple))))
          • Set AllBase[5] = (Base[(Integer A)] contains (Random unit from (Units owned by Player 5 (Yellow))))
          • Set AllBase[6] = (Base[(Integer A)] contains (Random unit from (Units owned by Player 6 (Orange))))
          • Set AllBase[7] = (Base[(Integer A)] contains (Random unit from (Units owned by Player 7 (Green))))
          • Set AllBase[8] = (Base[(Integer A)] contains (Random unit from (Units owned by Player 8 (Pink))))
          • Set AllBase[9] = (Base[(Integer A)] contains (Random unit from (Units owned by Player 9 (Gray))))
          • Set AllBase[10] = (Base[(Integer A)] contains (Random unit from (Units owned by Player 10 (Light Blue))))
      • For each (Integer B) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AllBase[(Integer B)] Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 12 (Brown)) and do (Unit - Order (Picked unit) to Attack-Move To (Random point in Base[(Random integer number between 1 and 44)]))
              • Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 11 (Dark Green)) and do (Unit - Order (Picked unit) to Attack-Move To (Random point in Base[(Random integer number between 1 and 44)]))
            • Else - Actions
 
Level 7
Joined
Feb 28, 2014
Messages
185
is there only one kodo, or one for every player?

There have any kodo will spawn out at any time (i wonder) for player 1 to player 10.

what do you mean by chasing?
Order the kodo(unit) to find out the runner(unit owned by player 1 - 10 ) and killed runner by looping trigger.

discribe better what should exactly happen.
sorry for my broken english.
 
Level 12
Joined
Oct 16, 2010
Messages
680
so lots of kodos for everyone u mean?:) I assume every player owns exactly one runner.
save the runners in unit variables
runners[1...10] for players 1-10

every 1 sec of game time spawn X kodos and attackmove them to runners

for e.g. every sec you want to send 3 kodos at all of the runners and order them continually to follow runners
  • Events
    • Time - every 1 sec of game time
  • Conditions
  • Actions
    • For every intvar from 1 to 10 do actions
      • Loop
        • Set tempLoc = spawnpoint
        • Create 1 kodo at tempLoc with face ...
        • Custom script: GroupAddUnit(udg_KodoGroup[udg_intvar],bj_lastCreatedUnit)
        • Create 1 kodo at tempLoc with face ...
        • Custom script: GroupAddUnit(udg_KodoGroup[udg_intvar],bj_lastCreatedUnit)
        • Create 1 kodo at tempLoc with face ...
        • Custom script: GroupAddUnit(udg_KodoGroup[udg_intvar],bj_lastCreatedUnit)
        • Custom script: RemoveLocation(udg_tempLoc)
        • Pick units in KodoGroup and do
          • Actions
            • Unit - Order Picked unit to attack move Runner[intvar]
 
Level 7
Joined
Feb 28, 2014
Messages
185
so lots of kodos for everyone u mean?:) I assume every player owns exactly one runner.
save the runners in unit variables
runners[1...10] for players 1-10

every 1 sec of game time spawn X kodos and attackmove them to runners

for e.g. every sec you want to send 3 kodos at all of the runners and order them continually to follow runners
  • Events
    • Time - every 1 sec of game time
  • Conditions
  • Actions
    • For every intvar from 1 to 10 do actions
      • Loop
        • Set tempLoc = spawnpoint
        • Create 1 kodo at tempLoc with face ...
        • Custom script: GroupAddUnit(udg_KodoGroup[udg_intvar],bj_lastCreatedUnit)
        • Create 1 kodo at tempLoc with face ...
        • Custom script: GroupAddUnit(udg_KodoGroup[udg_intvar],bj_lastCreatedUnit)
        • Create 1 kodo at tempLoc with face ...
        • Custom script: GroupAddUnit(udg_KodoGroup[udg_intvar],bj_lastCreatedUnit)
        • Custom script: RemoveLocation(udg_tempLoc)
        • Pick units in KodoGroup and do
          • Actions
            • Unit - Order Picked unit to attack move Runner[intvar]

So that , If i don want to create kodo anymore , what i need is only this ?

  • Events
  • Conditions
  • Actions
    • Unit - Order Picked unit to attack move Runner[intvar]
 
Level 7
Joined
Feb 28, 2014
Messages
185
and also stop the other trigger from executing with Trigger-turn "trigger" off

If the event i set to
  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
maybe the kodo will walking around in same place and become stuck .
Can i done it in two trigger?
  • Events
    • Unit - A unit enters TempLoc <gen>
  • Conditions
  • Actions
    • Trigger - Turn on Attack <gen>
  • Attack
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Unit Group - Pick every unit in (Unit-type) and do (Unit - Order (Picked unit) to Attack-Move To (Position of (Random unit from (Units owned by (Picked player))))))
 
Level 7
Joined
Feb 28, 2014
Messages
185
why would they walk around?

I think that the periodic time is too short .It make the trigger repeatly in X second.The kodo will go to find the Runner and suddenly go to find other runner. I've fix it :D.
  • Position Of Runner
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Set TempLoc = (Position of Unit)
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Unit Group - Pick every unit in (Units of type |c000033ffC|rrazy Kodo) and do (Unit - Order (Picked unit) to Attack-Move To TempLoc))
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Unit Group - Pick every unit in (Units of type |c00ff33ffG|renome-Enhanced Kodo) and do (Unit - Order (Picked unit) to Attack-Move To TempLoc))
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Unit Group - Pick every unit in (Units of type |c00ff33ffeA|rbysal Kodo) and do (Unit - Order (Picked unit) to Attack-Move To TempLoc))
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Unit Group - Pick every unit in (Units of type |c00ff33ffeD|remon Kodo) and do (Unit - Order (Picked unit) to Attack-Move To TempLoc))
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Unit Group - Pick every unit in (Units of type |c00ff33ffeX|rtreme Kodo) and do (Unit - Order (Picked unit) to Attack-Move To TempLoc))
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Unit Group - Pick every unit in (Units of type Satanic Kodo) and do (Unit - Order (Picked unit) to Attack-Move To TempLoc))
      • Player Group - Pick every player in (All allies of Player 11 (Dark Green)) and do (Unit Group - Pick every unit in (Units of type Final Boss) and do (Unit - Order (Picked unit) to Attack-Move To TempLoc))
      • Custom script: call RemoveLocation(udg_TempLoc)
But I find out one more thing. While the unit(Runner) enter gold mine (building) .The kodo will go to another way cause the runner is disappear . Can i make the kodo continue find the runner ?
 
Last edited:
Level 7
Joined
Feb 28, 2014
Messages
185
lol your trigger not even close to what i wrote o_O yes 10 sec should be enough.

Haha cause yours trigger is not same with what I need but the point viariable is useful to me .

for the mine thingy I don't really have an answer right now:p maybe there is some sort of condition to check if the unit is in a mine?:p

I will try to find out the solution .:) thanks for your helped.
 
Status
Not open for further replies.
Top