AoS Creep AI

l-hate_you

New Member
Reaction score
6
For the AoS I am making, i have established the working creep system in which the creeps attack move to the destined points until they reach the enemy base. Unfortunately, they have no AI except for this. I was wondering, how can I make a system in which they tend to attack enemy heroes/units that attack allied heroes whilst moving along the same path, as appears in many big time AoS games such as -im gonna say it- DotA. Please do not start any big controversy here:banghead: , I would just be pleased to know a way to do this. Thanks!
 

SFilip

Gone but not forgotten
Reaction score
634
Its rather simple triggering I believe.
Code:
SaveTheHero
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacked unit) is A Hero) Equal to True
        ((Attacking unit) is A Hero) Equal to True
    Actions
        Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Attacked unit)) matching ((((Owner of (Matching unit)) is an ally of (Owner of (Attacked unit))) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer))) and do (Actions)
            Loop - Actions
                Unit - Order (Picked unit) to Attack (Attacking unit)
Note that this code might be a bit bugged up...and it leaks BTW.
Anyway it should lure all computer controlled creeps allied with the attacked player within 1000 range to "defend" him - well as you probably know "offense is the best defense" ;)
 

emjlr3

Change can be a good thing
Reaction score
395
doesnt the built in creep AI do that anyhow?
 
L

LittleLamb

Guest
Its rather simple triggering I believe.
Code:
SaveTheHero
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacked unit) is A Hero) Equal to True
        ((Attacking unit) is A Hero) Equal to True
    Actions
        Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Attacked unit)) matching ((((Owner of (Matching unit)) is an ally of (Owner of (Attacked unit))) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer))) and do (Actions)
            Loop - Actions
                Unit - Order (Picked unit) to Attack (Attacking unit)
Note that this code might be a bit bugged up...and it leaks BTW.
Anyway it should lure all computer controlled creeps allied with the attacked player within 1000 range to "defend" him - well as you probably know "offense is the best defense" ;)

i think this code will be a problem, because if i'm a player, i will "try" to attack a hero and pull all the creep around and bring them run around the world and mass up the creep move system (if hero run faster than creep, then creep lose target and stand there do nothing) or pull to tower and play around with the creep..:D

aren't the gameplay constant call for help range already is 1 of the AI which solve this problem?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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