kodo ai help

Epicurus

New Member
Reaction score
1
This is kodo Demo specialist 01
Keep in mind that it is a unit type, not a specific unit.
littlekodo.jpg


Your probably guessing this is for a kodo tag. Your right. But this specific kodo is designed to attack only buildings. I want it to run around the map randomly, kill a building at random, and then repeat that process non stop. But there could be some rare time when the unit isn't within range of a building. Not only that I have a couple of questions about the triggers I have made so far.

Heres the triggers I made.

This one gets the kodo going when it enters the game or its respawned
Trigger:
  • kodo demo move out
    • Events
      • Unit - A unit enters Main deaths spawn <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Kodo demo specialist 01
    • Actions
      • Set kodo_dem_01 = (Random point in (Playable map area))
      • Unit - Order (Triggering unit) to Move To kodo_dem_01
      • Custom script: call RemoveLocation (udg_kodo_dem_01)
      • If (NEED HELP HERE) then do (Unit - Order (Triggering unit) to Attack (Random unit from (Units within 1000.00 of (Position of (Triggering unit))))) else do (Trigger - Run (kodo demo no building) (ignoring conditions))


This trigger is used to get the kodo going again if it doesn't detect a building
Trigger:
  • kodo demo no building
    • Events
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Kodo demo specialist 01
    • Actions
      • Set kodo_dem_01 = (Random point in (Playable map area))
      • Unit - Order (Triggering unit) to Move To kodo_dem_01
      • Custom script: call RemoveLocation (udg_kodo_dem_01)
      • If (need help again) then do (Unit - Order (Triggering unit) to Attack (Random unit from (Units within 1000.00 of (Position of (Triggering unit))))) else do (Trigger - Run (This trigger) (ignoring conditions))



This is used if the kodo was successful at finding and killing in the first trigger
Trigger:
  • kodo demo kill move
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Killing unit)) Equal to Kodo demo specialist 01
    • Actions
      • Set kodo_dem_01 = (Random point in (Playable map area))
      • Unit - Order (Killing unit) to Move To kodo_dem_01
      • Custom script: call RemoveLocation (udg_kodo_dem_01)
      • If (help help help) then do (Unit - Order (Killing unit) to Attack (Random unit from (Units within 1000.00 of (Position of (Killing unit))))) else do (Trigger - Run (kodo demo no building) (ignoring conditions))


So here are my question.

Does "unit within 1000.00 of (position of trigger/killing unit)" leak the way it is set up now?

How do I make a condition to check if there is a building within 1000 range of tiggering/killing unit?

How do I make sure that the unit that is issued a move then attack order in the "no buiding" trigger is the same one that failed at finding a building in trigger 1,2 or 3? I will have mroe than one of these little critters running around.


Sense the unit is set up to only attack buildings does attack unit garantee that it will target and attack a building or will it target a unit and only attack it if it is a building?
Any help will be welcomed. Thanks. :)
 

Exfyre

hmm...
Reaction score
60
first of all, set the config in the object editor so that the kodo can only attack buildings.
14l3klj.jpg


Then for the trigger just do

Trigger:
  • Kodo Spawn
    • Events
      • -Kodo Spawns
    • Conditions
      • -Blah
    • Actions
      • -set temploc = Random point
      • -Attack-move to temploc
      • -destroy temploc

Trigger:
  • Kodo Keep moving
    • Events
      • -Unit issued order with no target
    • Conditions
      • -issued order == "stop"
    • Actions
      • -set temploc = Random point
      • -Attack-move to temploc
      • -destroy temploc
 

Epicurus

New Member
Reaction score
1
I did the target tyoe already.

I don't want a attack move. Wont that make it attack everything in in its path to the random point. I want it to move to a random point, passing all buildings it sees on the way and then attack random building in that area.

I don't understand issed order with no target.
 

jig7c

Stop reading me...-statement
Reaction score
123
once the kodo enters the death spawn, it'll get issued an order to attack-move to a random point in the map, once he has moved there, he'll stop, hence the second trigger..... and if you do only structures in the object editor, it won't attack anything but structures, don't think too hard about this!
 

Epicurus

New Member
Reaction score
1
Sorry to bring this back up but I've decided to simplify the whole thing.

I got this so far.

Trigger:
  • kodo demo move out
    • Events
      • Unit - A unit enters Main deaths spawn <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to kodo_demo[1]
    • Actions
      • Set kodo_dem_01 = (Random point in (Playable map area))
      • Unit - Order (Triggering unit) to Move To kodo_dem_01
      • Custom script: call RemoveLocation (udg_kodo_dem_01)


Trigger:
  • kodo demo kill move
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Killing unit)) Equal to kodo_demo[1]
    • Actions
      • Set kodo_dem_01 = (Random point in (Playable map area))
      • Unit - Order (Killing unit) to Move To kodo_dem_01
      • Custom script: call RemoveLocation (udg_kodo_dem_01)


A unit automatically attacks the closest thing to it, right? So if I make it able to attack anything on the whole map, then it shouldn't need a if unit is in range of, or any stop, issued order crap.

I got my aquisition set to 20,000 right now. But it still retreats to the point if it moves to far is there a way to change this?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top