Hi everyone, I often get stuck with events and their order of execution but now I lost any idea whats wrong.
I'm making realtime hot-seat game on the grid (like bomberman, but with creeps).
When player attack NPC , battle menu(battle_tag) appears over and copy player/enemy parameters into a separate array (array_battle).
The battle is automatic: each side deals damage with its speed (takes from the array)
Sides hit each other's health until one of them is over, then the menu is removed and the player can move on.
The problem is that there are several live players in the game who can start fights at any one time.
Right now I can't make so that one event is performed for each object(battle_tag) separately.
I tried several options, and in the latter it turns out that one battle is waiting for the previous one to be end.
Thats how I do it now i.imgur.com/HHAyxBF.png
*without FOR EACH event run only for one object.
file: dropbox.com/s/fzl73ofdn9e9y27/homm_test.capx?dl=1
Just move at enemes in one time (W for PL1 and left arrow for PL2). At debug you can see rusults in array_battle.