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

Get help using Construct 2

Post » Sat Jul 11, 2015 2:25 pm

round(Audio.PlaybackTime("music"))=2
B
5
Posts: 27
Reputation: 571

Post » Sat Jul 11, 2015 2:26 pm

I need to make a sprite move a certain distance at a certain speed.
B
5
Posts: 27
Reputation: 571

Post » Sat Jul 11, 2015 2:31 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 11, 2015 2:50 pm

The distance is 500 pixels backwards. I just want to slow down the speed in which it is going.
B
5
Posts: 27
Reputation: 571

Post » Sat Jul 11, 2015 2:52 pm

Bullet, works but it flips the sprites over.
Last edited by Sharkmaster24 on Sat Jul 11, 2015 2:58 pm, edited 1 time in total.
B
5
Posts: 27
Reputation: 571

Post » Sat Jul 11, 2015 2:57 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 11, 2015 2:59 pm

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
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 11, 2015 3:02 pm

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.
B
5
Posts: 27
Reputation: 571

Post » Sat Jul 11, 2015 3:09 pm

LittleStain wrote:You could add a trigger once while true condition to your event..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 11, 2015 3:18 pm

Thanks a lot. It works.
B
5
Posts: 27
Reputation: 571

Previous

Return to How do I....?

Who is online

Users browsing this forum: tarek2, wenwen11212016 and 8 guests