- Joined
- Dec 20, 2015
- Messages
- 6
Out of curiosity I just wanted to test the capabilities of the AI editor on a custom map for personal use.
For the most part, it does exactly what I needed it to do though, every once in a while the AI retreats for no reason. The AI returns to the base only to go back and resumes its task again of attacking, which causes some delays.
It looks like there may be another order conflicting with the attack order.
Can someone point in the right direction on how to fix this?
Here is the script. Can someone take a look at this and help me pinpoint the cause of units retreating prematurely?
I'm still looking into this. Any help would be appreciated.
So far after tinkering with the script only FormGroups seems to be making a difference but messing with that disables the movement altogether.
I'm assuming the AI keeps returning back to form a new group before relaunching its assault despite the current group not being defeated yet.
Update: problem solved added 1 line of code to find a new target
// Attack the target and increment attack wave
if (target != null) then
call AttackTarget( target, setAlly )
call AttackWaveUpdate( )
set target = null // I added this 1 line here in case anyone else has a similar problem
For the most part, it does exactly what I needed it to do though, every once in a while the AI retreats for no reason. The AI returns to the base only to go back and resumes its task again of attacking, which causes some delays.
It looks like there may be another order conflicting with the attack order.
Can someone point in the right direction on how to fix this?
Here is the script. Can someone take a look at this and help me pinpoint the cause of units retreating prematurely?
I'm still looking into this. Any help would be appreciated.
So far after tinkering with the script only FormGroups seems to be making a difference but messing with that disables the movement altogether.
I'm assuming the AI keeps returning back to form a new group before relaunching its assault despite the current group not being defeated yet.
Update: problem solved added 1 line of code to find a new target
// Attack the target and increment attack wave
if (target != null) then
call AttackTarget( target, setAlly )
call AttackWaveUpdate( )
set target = null // I added this 1 line here in case anyone else has a similar problem
Attachments
Last edited: