Creating objects aside other objects...

For questions about using Classic.

Post » Sun Oct 24, 2010 3:20 pm

and binding their movements together?

My idea is to create a basic shooter with a "growning" space ship. Just imagine the spaceinvaders sprite, made of big squares or blocks. Once an enemy is destroyed, could spawn one of those blocks and the player should be able to catch them and add them to his ship. The new block should be spawned at the right coordinates and move together with the ship.

Any idea of an elegant way to do it?
B
1
G
2
Posts: 4
Reputation: 633

Post » Sun Oct 24, 2010 5:04 pm

The custom movement behavior has a movement called "restrain distance from object".
It doesn't work well with chains, but you can have multiple instances "slide", or "bump" off of each other.

Edit:
Keep in mind that will only place them a certain distance, and doesn't take angle into account.
To set it at a certain position while keeping the same angle as the ship you could also try image points.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sat Nov 27, 2010 2:42 pm

Thank you for the suggestions. In the end, i did it with image points and variables to understand if the block is attached and which kind of block it is (gun, armor, thruster). Unfortunately, it didn't work very well and i scrapped it from the design (it was for a project at university so i just had to produce something quickly, avoiding cool but time-eating features).
B
1
G
2
Posts: 4
Reputation: 633


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests