How do I switch units effectively? The problem is that sometimes the units might glitch and more than 1 will end up on the playfield.
There are 8 different units which I have to switch.
None.
Have a storage area for all the units somewhere, and when it's time to switch, do a "center PlayerLocation on Unit X", "move Unit X from PlayerLocation to Storage", and "move Unit Y from Storage to PlayerLocation". This is assuming that Unit X is the unit you were using already, and Unit Y is the one you're switching to.
If you don't want them to be able to see the storage area, you can just give Unit X to another player (like Player 9) before moving to to storage, and giving the new unit to them after it is moved out of storage.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
What Az said will work but make sure you pay attention to details such as:
"Unit x" means that you move a specific unit type, e.g. Terran Space Marine, as opposed to [men] or [any unit].
Another reason why you might end up with more than 1 units on the playing field is that the original unit might not successfully move to the storage area. To ensure it works do the "center PlayerLocation on Unit X" in the same trigger that moves the unit to storage. Also make sure storage is large enough.