Make a infinte runner platform array

Get help using Construct 2

Post » Wed Mar 19, 2014 4:41 pm

I'm trying to make a infinite runner where the game picks one of my platforms then places just beyond the current platform. I feel 'pick one' paired with families should help but I only have the free edition. I was wondering if an array should be able to solve this.
B
2
Posts: 4
Reputation: 158

Post » Wed Mar 19, 2014 5:32 pm

Not sure if you can insert object types into an array in C2.
A work around you be to set a random number and pick a specific object to create depending on the result.
Something like
r > Set value to int(random(3))

r = 0 > create object1
r = 1 > create object2
r = 2 > create object3
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 » Fri Mar 21, 2014 6:46 am

caiorosisca wrote:Not sure if you can insert object types into an array in C2.
A work around you be to set a random number and pick a specific object to create depending on the result.
Something like
r > Set value to int(random(3))

r = 0 > create object1
r = 1 > create object2
r = 2 > create object3


^^^^
Thanks dude. This was genius. I was even able to assign the types of enemy's that make sense for each platform using the same logic.
B
2
Posts: 4
Reputation: 158

Post » Fri Mar 21, 2014 7:15 am

Put your backgrounds in one sprite. Every background is a different AnimationFrame. Then create Background and set Animationframe random.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 55 guests