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

Get help using Construct 2

Post » Sat Jul 11, 2015 5:47 am

Basically what the title states. I need help with spawning 1 of 6 total sprites to randomly spawn. Do I have to use some sort of function? I don't think I can put it all sprites into one sprite as its animations.

Also, is there any way to adjust the speed of the way objects move when using the move forward action?
Its a little too fast.

Please help, thanks in advance,
Sharkmaster24
B
5
Posts: 27
Reputation: 571

Post » Sat Jul 11, 2015 9:19 am

Place your 6 sprites in a family and use system create object family. This will select a random sprite from the family.
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180

Post » Sat Jul 11, 2015 11:13 am

Thanks for that, I hadn't noticed that little coda on the system actions page :)
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Sat Jul 11, 2015 2:08 pm

That just spawns all of the sprites in the family. I want it to be spawned one at a time, since I need to spawn one sprite at different times, so one during each interval can have a specific action to follow
Last edited by Sharkmaster24 on Sat Jul 11, 2015 2:16 pm, edited 1 time in total.
B
5
Posts: 27
Reputation: 571

Post » Sat Jul 11, 2015 2:11 pm

To me it seems the move forward action requires numerical input..

1 means 1px per tick
2 means 2px per tick

So I guess changing that would speed up or slow down the movement..
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:17 pm

Yeah, I inputted a number, but it went superfast across the screen.
B
5
Posts: 27
Reputation: 571

Post » Sat Jul 11, 2015 2:19 pm

Sharkmaster24 wrote:Yeah, I inputted a number, but it went superfast across the screen.


If it's too fast, use a lower number..
If it's too slow, use a higher number..
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:21 pm

But it only lets me input distance, and I need it to travel a specific amount.
B
5
Posts: 27
Reputation: 571

Post » Sat Jul 11, 2015 2:22 pm

Sharkmaster24 wrote:That just spawns all of the sprites in the family. I want it to be spawned one at a time, since I need to spawn one sprite at different times, so one during each interval can have a specific action to follow


What event/conditions are you using for this action?
When are the sprites supposed to be created?
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:23 pm

Sharkmaster24 wrote:But it only lets me input distance, and I need it to travel a specific amount.


Please explain what you are trying to do and why you are using this action for it..
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

Next

Return to How do I....?

Who is online

Users browsing this forum: Apollo14, MaujDeveloper, totoe and 5 guests