Grouping and Random Generations of Groups? Forum Home > Construct 2 General > How do I....? |
Post Reply
|
| Author | ||
Post Options
Quote Reply
Topic: Grouping and Random Generations of Groups?Posted: 18 Mar 2012 at 12:05pm |
||
|
Hello all;
Ok I have a bit of a question, I am new to this product and I am still feeling around in the dark a little. So I thought I would post here for help. What I need to do is have a group of sprites placed together in a couple different shapes, kinda like Tetris shapes. However each block in the shape is its own color, and this is where the random colors part needs to take over. So say for arguments sake, it is a "L" shaped tetris piece, mine would have 5 colored blocks making up that same shape. which would be randomly generated before it comes onto the scene. Each color block would also have its own behaviors attached to it for color matching e.t.c But first I want to get the movement and random block generation completed. They need to be grouped together because the player will have the option to move left to right or rotate said objects. Where do I start to get this working? Thanks in advance for your time. |
||
![]() |
||
Post Options
Quote Reply
Posted: 18 Mar 2012 at 1:14pm |
||
|
I did a tetris game some weeks ago, and to get the shape I simply wrote down some relative coordinates.
It looked like
With 4 levels of token: a line break (newline) separates each shapes a # separates each possible rotation a | separates each block coordinates a , separates X and Y coordinates. Then I just had to select a random line, and to make it simple I just used the first rotation on spawn. Also note that in tetris all shapes are made of 4 blocks that made things easier too. Then I just had to know the current shape and move the blocks accordingly. Tetris always have one shape moving at a time so it made things easy to. I just had to flag the blocks as moving or not (boolean) |
||
![]() |
||
Post Options
Quote Reply
Posted: 11 Aug 2012 at 4:40pm |
||
Can you please elaborate further or provide a sample capx. Thanks! |
||
![]() |
||
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |