Hello everyone,
I am editing a map and I currently have two problems which I unfortunately cannot fix on my own. I was wondering if you are able to help and if yes I will be extremely grateful.
The first problem is I have a trigger when a player leaves to change ownership of each unit to a random teammate:
This trigger works, but I noticed that the units changing owner will stop doing their order. Is there a way that I can change the ownership of the units and have them continue with their order as if nothing happened?
The second problem I have is with a trigger that spawns units for players 1-8:
What happens is that the trigger works and it has a wait function where it repeats the action with a wait of 2 minutes before creating stronger guards. I have noticed that when the trigger is triggered, other For Each Integer A will interfere and reset other currently running loops. I have tried to Google this and I think I need to do a local variable. Is this correct and how would I do that?
Thank you for reading this.
I am editing a map and I currently have two problems which I unfortunately cannot fix on my own. I was wondering if you are able to help and if yes I will be extremely grateful.
The first problem is I have a trigger when a player leaves to change ownership of each unit to a random teammate:
Code:
Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
Loop - Actions
Unit - Change ownership of (Picked unit) to (Random player from (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))) and Change color
The second problem I have is with a trigger that spawns units for players 1-8:
Code:
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Unit - Create 10 Guards for (Player((Integer A))) at (Center of Spawn <gen>) facing Default building facing degrees
Unit Group - Order (Last created unit group) to Attack-Move To ((Owner of (Last created unit)) start location)
Thank you for reading this.