Loops for individual objects..
This might be a stupid question - I am tired so I can't really think at the moment. Basically I am creating an online platform game, and it is suppose to support 15 players - all of whom have a certain ID number assigned by MooClick (which is normal, obviously).
The problem I have is when it comes to loops - rather than simply sending the positions of the players every second (laggy), I am simply sending the following information:
+ When player starts moving left/right
+ When player stops moving
+ When player presses jump
It all works perfectly fine and with little lag - the problem is that my platform engine is created with fastloops. This means that I need to run a loop for each player whenever they jump, according to their Moo ID (which is stored as alterable value A).
I have no idea whether it is possible to run different loops for different objects. I tried setting the loop names as their Moo ID however it still doesn't assign to their specific object.
Sorry if this sounds like garble, like I said, I am tired. To see what I mean, create 5 active objects (all the same object, just 5 clones). Spread a value in alterable value A so that you get objects with ID numbers through 1-5. Then code an event so that when you click an object, it starts a loop which applies to that object only. Although in my game all the loops need to run simultaneously, which means I can't just use one single loop for all the objects.
I think.. or something.. need sleep..
Possible better description
<Flava> imagine I have 3 objects and apply gravity to them, and I make them stop when they collide with a backdrop
<Flava> each object started at a different height so they reach the ground at different times
<Flava> when they overlap the backdrop, they will be stuck in it so I need to use a loop to push out each object until it is no longer overlapping the backdrop
<Flava> I can't use the same loop to push them out, because they all reach the ground at different times
<Flava> so if I run the loop to push them out, when the first object reaches the ground, then the other objects will start moving before they've even reached the ground
<Flava> and as you said before, I can't run more than one instance of the same loop at the same time
Re: Loops for individual objects..
Check this example:
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=37996