Hello Clickers !
I have a question concerning the logic of MMF. Using Fusion 2.5 at the moment, trying to build a simple html5 game.
The scenario.
I have a group of events that perform some operations on an object.
Now I want the same operations performed on all the objects, that I've "grouped" using the same qualifier for each object.
So, I guess the best way to achieve what I want, is using a loop on each object having that qualifier.
As test, I've added a single event in the loop, that writes the name of the current object. That works flawlessy as expected.
I know that I can copy all the events that should be performed on a single object in the loop, but there's a problem: these events could be repeated on a single object, until a certain condition is reached. That's why I need a sort of a function, that can be called recursively.
I'm aware of the "While loop" extension, but sadly it does not work for a HTML5 project.
In other terms, I wonder if Fusion 2.5 has something like grouping a collection of events in a "Function", that can be called in the program flow in a recursively (or while--loop) manner.
What I'm trying to achieve, is an automatic placement of ships inside a quadrant (sinking ships game). Each ship should not overlap another, that's why the events could be repeated, until this condition is met. This process should be repeated for each ship.
I have already coded the events for a single ship, and they work as expected. The ship is correctly positioned after a bunch of tries.
Now I want use the same events for all the ships..
I'm aware I can make a group of events, and that this group can be activated or deactivated. But this is something different of having a bunch of events as a function, and "call" it when needed.
I hope you get wat I mean. Sorry if my description sounds complicated.
Any help would be greatly appreciated
Have a nice day,
Sergio