Hi
For my hero map I've been trying to make an AI system for it and have been fine with it till today where I decided that they really needed to decide whether the risk is worth it and things.
However I'm not gunna like but I am totally confused! :/
What I had thought would be logical is that the a periodic timer would go and then there would be 2 unit groups where one would collect nearby allies and another collect enemies. Then I thought it logical to have it collect the health the units within the groups and collect their levels. Originally I thought that I would need some form of average after that but that backfired.
After that I have no idea what I'm doing anymore. The numbers are just massive as I made the game times all the health/levels together and then look at which is higher and stuff. I just dunno tbh :/ Anyone up to help? :/
For my hero map I've been trying to make an AI system for it and have been fine with it till today where I decided that they really needed to decide whether the risk is worth it and things.
However I'm not gunna like but I am totally confused! :/
What I had thought would be logical is that the a periodic timer would go and then there would be 2 unit groups where one would collect nearby allies and another collect enemies. Then I thought it logical to have it collect the health the units within the groups and collect their levels. Originally I thought that I would need some form of average after that but that backfired.
After that I have no idea what I'm doing anymore. The numbers are just massive as I made the game times all the health/levels together and then look at which is higher and stuff. I just dunno tbh :/ Anyone up to help? :/
-
AI Threat Detection
-

Events
-

Conditions
-

Actions
-


Set AIMoveAllyGroup = (Units within 1200.00 of TempPoint matching ((((Matching unit) belongs to an ally of AITempPlayer) Equal to True) and (((Matching unit) is alive) Equal to True)))
-


Unit Group - Pick every unit in AIMoveAllyGroup and do (Actions)
-



Loop - Actions
-




Set TempUnit = (Picked unit)
-




Set AIMoveAllyHP = (AIMoveAllyHP + (Life of TempUnit))
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(TempUnit is A Hero) Equal to True
-
-





Then - Actions
-






Set AIMoveAllyLevel = (AIMoveAllyLevel + (4 + (Hero level of TempUnit)))
-
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Unit-type of TempUnit) Equal to Tidal Guardian (Level 1)
-
-







Then - Actions
-








Set AIMoveAllyLevel = (AIMoveAllyLevel + 12)
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Unit-type of TempUnit) Equal to Tidal Guardian (Level 2)
-
-









Then - Actions
-










Set AIMoveAllyLevel = (AIMoveAllyLevel + 20)
-
-









Else - Actions
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












(Unit-type of TempUnit) Equal to Tidal Guardian (Level 3)
-
-











Then - Actions
-












Set AIMoveAllyLevel = (AIMoveAllyLevel + 30)
-
-











Else - Actions
-












If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-













If - Conditions
-














(TempUnit is A structure) Equal to False
-
-













Then - Actions
-














Set AIMoveAllyLevel = (AIMoveAllyLevel + (Level of TempUnit))
-
-













Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-


Set AIMoveAllyAverage = (AIMoveAllyHP x (Real(AIMoveAllyLevel)))
-


Set AIMoveAllyAverage = (AIMoveAllyAverage / (Real((Number of units in AIMoveAllyGroup))))
-


Set AIMoveEnemyGroup = (Units within 1200.00 of TempPoint matching ((((Matching unit) belongs to an enemy of AITempPlayer) Equal to True) and (((Matching unit) is alive) Equal to True)))
-


Unit Group - Pick every unit in AIMoveEnemyGroup and do (Actions)
-



Loop - Actions
-




Set TempUnit = (Picked unit)
-




Set AIMoveEnemyHP = (AIMoveEnemyHP + (Life of TempUnit))
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(TempUnit is A Hero) Equal to True
-
-





Then - Actions
-






Set AIMoveEnemyLevel = (AIMoveEnemyLevel + (4 + (Hero level of TempUnit)))
-
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Unit-type of TempUnit) Equal to Tidal Guardian (Level 1)
-
-







Then - Actions
-








Set AIMoveEnemyLevel = (AIMoveEnemyLevel + 12)
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Unit-type of TempUnit) Equal to Tidal Guardian (Level 2)
-
-









Then - Actions
-










Set AIMoveEnemyLevel = (AIMoveEnemyLevel + 20)
-
-









Else - Actions
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












(Unit-type of TempUnit) Equal to Tidal Guardian (Level 3)
-
-











Then - Actions
-












Set AIMoveEnemyLevel = (AIMoveEnemyLevel + 30)
-
-











Else - Actions
-












If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-













If - Conditions
-














(TempUnit is A structure) Equal to False
-
-













Then - Actions
-














Set AIMoveEnemyLevel = (AIMoveEnemyLevel + (Level of TempUnit))
-
-













Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-


Set AIMoveEnemyAverage = (AIMoveEnemyHP x (Real(AIMoveEnemyLevel)))
-


Set AIMoveEnemyAverage = (AIMoveEnemyAverage / (Real((Number of units in AIMoveEnemyGroup))))
-
-




