Array Logics Make me mad !

Get help using Construct 2

Post » Sat Dec 29, 2012 5:06 pm

Hello , I'm back with another stupid issue with the array logics !

The Logic seems perfect ... I want the blocks that aren't glued to other blocks to be destroyed after the primary generation ( = ) . Represented in the array by 2 ... Blocks that are floating around by themselves ...

*******
*> = <*
*******

Here's a my capx ...

Hope you can also explain me where is my error , because those arrays make me nervous ...


Thanks for all !
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Sat Dec 29, 2012 7:50 pm

No one :( ?
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Sat Dec 29, 2012 8:12 pm

Why are you destroying the blocks under "secondary generation"? To give more white space? I just can't see why those events are in there tbh. You're testing for collisions that will never happen because you have the "immovable" property set for the blocks so they'll never fall. Also, you've created them in a grid fashion, so they will never collide.

Take out the events under Secondary Generation, or disable them. It works for me.

As for the placement of the player, set a random XY after the blocks are created, then check if it's overlapping a block - if so, do another random XY and so on, until it's not overlapping. Or an easier method would be to place the player at specific coords, then in your block creation events, only create a block if it doesn't overlap the player.

Hard to know if I've given the right answer. It looks like you're trying to create random platforms for the player to jump around on, in which case, my answer would be correct ;p

As for your array knowledge, it seems pretty solid to me.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Sat Dec 29, 2012 9:52 pm

Oh wait ... that's the wrong capx ! Uhum , Sorry ... :( I lost the last capx
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 31 guests