Let's think that we have a Family that is full of objects that will appear on screen randomly. Every 5 second the game will choose one random object from that family and spawn it to the screen.
This is how it happens:
Most of those objects are player enemies. Now I have made rule where when any of them touches the weak point of player, it will reduce life from HealthBar
This is how it happens:
Now the problem. When I said that the family includes mostly "enemies", I did not tell, that the family also includes health crates and coins that you can collect for score. The logical follow for that is that if a player jumps to the health crate with his weak point, he actually loses health and very fast he will have almost all of it back (but not all, because he touched the family member with the weak point of player).
This same happens with coins. Player loses health and has score bonus.
The weak point is one very simple invisible object that is pinned to player and if anything overlaps it, it will remove health from player.
So i need to do a family for Coins and Health Crates, but the problem is that i don't know how do i fix the first event for being like:
System - Every 5 seconds
System - Pick a random Spawner instance
------
Spawner - Spawn PhysicsObjects on layer 2
OR
Spawner - Spawn PhysicsObjects2 on layer 2
Now I know that I can do OR-events, but I have no idea how to do OR-actions?
Edit: Ok, there is a little problem with this i notices after i wrote this text. It would spawn too often the health and coin stuff, because of that rule it will choose average 50 % of time the PhysicsObjects2. But i have no idea how to do it differently. I cannot left them into the PhysicsObjects -Family, because then they will reduce life from player and will create "pain" -particles when touching player. Also if they are in some other family, they will mess up my spawning events (and lot of other stuff), because they would appear then at the same time with the other objects.