Heres an example of what Im trying to do. The problem is that the for each loop only runs once. So how do i repeat it?
You have the trigger once condition there, right?
If you remove it, it might not only trigger once..
I'm also wondering why you have the else statements, by the way..
I would just do it like this
system pick all z-order
z-order move to layer "infront"
system pick z-order by comparison z-order.y+z-order.elevation > Playerbase.y
z-order move to layer "Behind"