Page 2 of 2

Re: How do I spawn 1 of 6 sprites at a time randomly

PostPosted: Sat Jul 11, 2015 2:25 pm
by Sharkmaster24
round(Audio.PlaybackTime("music"))=2

Re: How do I spawn 1 of 6 sprites at a time randomly

PostPosted: Sat Jul 11, 2015 2:26 pm
by Sharkmaster24
I need to make a sprite move a certain distance at a certain speed.

Re: How do I spawn 1 of 6 sprites at a time randomly

PostPosted: Sat Jul 11, 2015 2:31 pm
by LittleStain
You could add a trigger once while true condition to your event..

What is the certain distance, what is the speed?
Would using the bullet-behaviour work for this?
You might want to have a look at the moveto behaviour plugin in the plugin section of this forum, for it sounds to me it does exactly what you are trying to achieve..

Re: How do I spawn 1 of 6 sprites at a time randomly

PostPosted: Sat Jul 11, 2015 2:50 pm
by Sharkmaster24
The distance is 500 pixels backwards. I just want to slow down the speed in which it is going.

Re: How do I spawn 1 of 6 sprites at a time randomly

PostPosted: Sat Jul 11, 2015 2:52 pm
by Sharkmaster24
Bullet, works but it flips the sprites over.

Re: How do I spawn 1 of 6 sprites at a time randomly

PostPosted: Sat Jul 11, 2015 2:57 pm
by LittleStain
Could you share your events and/or capx, because for now I can only repeat the same answer..
set the amount of pixels per frame lower to reduce the speed..

You might be a lot better of using the bullet behaviour or the move to behaviour or even the 8 direction behaviour to get it done the way you envision, but I wouldn't know, for it is very unclear to me what is and what isn't happening the way you want it..

Maybe checking the x-coordinate on which the sprite is created with it's current x and having the movement depend on that would help..
But really, without further clarification about your events and the expected result, I'm only guessing..

Re: How do I spawn 1 of 6 sprites at a time randomly

PostPosted: Sat Jul 11, 2015 2:59 pm
by LittleStain
Sharkmaster24 wrote:(towards the left side)

I dont think bullet works, its not letting me go backwards.


Bullet set angle of movement to 180 would do that..
In the properties of the bullet behaviour you'd want to "set angle" to no

Re: How do I spawn 1 of 6 sprites at a time randomly

PostPosted: Sat Jul 11, 2015 3:02 pm
by Sharkmaster24
Ok. Thats working, but what about the spawning? I need to spawn only one sprite, not all of them in the family, but I still need to spawn one of them randomly.

Re: How do I spawn 1 of 6 sprites at a time randomly

PostPosted: Sat Jul 11, 2015 3:09 pm
by LittleStain
LittleStain wrote:You could add a trigger once while true condition to your event..

Re: How do I spawn 1 of 6 sprites at a time randomly

PostPosted: Sat Jul 11, 2015 3:18 pm
by Sharkmaster24
Thanks a lot. It works.