Spawn with no collisions

Get help using Construct 2

Post » Sun Feb 16, 2014 10:53 pm

Hello!
I am looking to spawn a variety of sprites on the bottom line there where the house is however I want them to line up next to each other (about 5 sprites) in a random order each time they spawn, can anybody help me out with this?
Thanks!
B
15
S
2
G
1
Posts: 108
Reputation: 1,902

Post » Mon Feb 17, 2014 10:04 am

bump
B
15
S
2
G
1
Posts: 108
Reputation: 1,902

Post » Mon Feb 17, 2014 1:00 pm

maybe in better words - I want the game to spawn a variety of sprites instead of one, for example in the flyingalong template there are basic blocks, I want there to be different blocks to spawn rather than the same one sprite, can you help with this?
Thanksseskadog2014-02-17 13:29:06
B
15
S
2
G
1
Posts: 108
Reputation: 1,902

Post » Mon Feb 17, 2014 1:39 pm

I'm not sure if I understood what you want. Put all the images you want into a single sprite, set animation speed to 0, set image point to bottom on the whole animation.
Then spawn your object, set frame to floor(random(0,numberOfImagesYouHave)), set collision to disabled.
Is that what your are looking for?
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Mon Feb 17, 2014 1:53 pm

Hi thanks for getting back to me

I want the a variety of houses to spawn on that bottom basicly however I dont know how to randomise which one is spawned onto that line and I need to them to spawn simultaneously next to each other like on the template for flying along (except instead of the squared blocks there will be different houses spawning), I have tried doing it but they simply collided.

Jacob
B
15
S
2
G
1
Posts: 108
Reputation: 1,902

Post » Mon Feb 17, 2014 2:00 pm

If the houses are all the same width it should be as easy as making them different frames of 1 animation (with speed set to 0) and creating them the way the blocks are created in the flying alkong sample.

just add an event

house on created
- set animationframe to choose(0,1,2,3,4)
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 » Mon Feb 17, 2014 2:05 pm

Hi,
Yes I tried this however because there are about 5 houses scrolling past they all end up being the same
Jacob
B
15
S
2
G
1
Posts: 108
Reputation: 1,902

Post » Mon Feb 17, 2014 2:12 pm

is your animation set to speed 0?
Are all houses animationframes of the same sprite?
Are all houses the same width?
Are you setting the animationframe on created as said above?

Could you add a link to your capx and/or a screenshot of your eventsheet so we can see what you have tried?
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 » Mon Feb 17, 2014 2:22 pm

Disregard I have it working, thanks for your help ;)

seskadog2014-02-17 14:40:28
B
15
S
2
G
1
Posts: 108
Reputation: 1,902


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 42 guests