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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top