I need the for each object loop to loop through all my enemies and set their health and damage based on their level but I can’t find it. Was it removed or is it under a different name? I don’t know. But if you know where I can find it please let me know
Never mind I found it. You have to click the plus in the top right corner
Thank you for the hint, where to find the ForEach. What I find confusing though, is that I can only execute the ForEach on 1 single object. I wonder if it’s possible to run over ALL objects (which are not instances but may be e.g. different sprites) in the scene e.g. to count them. I can not find how to do this.
For example (pseudo code, “active” would be an object variable which i created beforehand):
int activeObjects = 0; foreach Objects ( if (object.active == true) ( activeObjects += 1; ) )
I think I found out how to do it.
- Create an Object Group (you can add your objects manually)
- Then in the Events you can set this object group as target for the ForEach
I’m glad you found this post helpful, however please do not bump year old or multiyear old threads.
If you still have questions on use of the For Each event type, please feel free to make a new thread.