I've been at this for a while now, and honestly don't know what I'm doing wrong. My goal is to have enemy's runaway to their teammate and reload at the same time when they run out of ammo. This is my current code that's not working:
+ Enemy: Ammo ≤ 0
+ Enemy: Pick nearest to (Enemy.X, Enemy.Y)
+ System: Trigger once
-> Enemy: Pathfinding: Stop
-> Enemy: Pathfinding: Find path to (Enemy.X, Enemy.Y)
-> Audio: Play Array.At(OpposingGun,13) not looping from Sounds at volume 10 dB at object Enemy (inner angle 360, outer angle 360, outer gain 0 dB) with tag ""
-> System: Wait Array.At(OpposingGun,11) seconds
-> Enemy: Set Ammo to Array.At(OpposingGun,6)
The array is for storing the properties of the weapon, In this case the reload sound effect and reload time.