Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: AnasAbdin on Mon 29/08/2011 08:49:17

Title: floating objects
Post by: AnasAbdin on Mon 29/08/2011 08:49:17
guten tag geeks!
I'm trying to move an object in a floating style... the object's X coordinate should move in a range of 10 pixels back and forth.. while the Y remains the same..

I managed to do it smoothly in the room repeat function....
however, I have 20 objects in that room, could anyone share ideas with me on how to apply such movement to all 20 objects without the need to code them one by one?

It would be appreciated if the objects move randomly ( I don't wanna see 20 objects move 5 pixels to the right then to the left simultaneously like kittens watching a ping pong game!)

dank!
Title: Re: floating objects
Post by: Khris on Mon 29/08/2011 10:02:32
You can use the object[] array to access all room objects.
If you put them at random positions within their supposed moving range in before_fadein, they won't be in sync.
Title: Re: floating objects
Post by: AnasAbdin on Mon 29/08/2011 10:04:11
Thanx :) will try it and let u know