WInd turbine trouble

Get help using Construct 2

Post » Fri Jan 31, 2014 8:27 pm

Started working with Construction 2 a weak ago, and what a cool program!

Im using it to build a specific game and cant get one thing working. Its a game where you can shoot wind turbines (long story;)), so I made three images: one for the tower, on for the blades and one for the entire thing crashing. Now I want the blades to spin and when the player shoots the turbine (doesnt matter if he hits the tower or blades), the entire thing comes crashing down.

Ive tried two approaches:

1) Making different sprites: one for the tower, one for the blades. But the problem when either one of them is shot (overlapping on mouse click), I cant figure out how to remove the other. They are different instances of different objects/sprites.

2)Making an animation of the entire thing (tower and blades), when its shot change to a crashing animation. The problem here is images used for the different frames are a slightly different. There are three blades which are positioned differently in every frame. But because they are positioned differently, the images size differences: when a blade is on at the top the images becomes higher and smaller, etc. This makes the tower bounce in the animation. I tried this with a sprite strip too, but no success.

Does anybody have an idea or suggestions how to get this working? Thank you very much!
B
5
Posts: 4
Reputation: 233

Post » Fri Jan 31, 2014 10:24 pm

Not sure what you mean by remove the other...
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
32
S
15
G
3
Posts: 356
Reputation: 5,269

Post » Fri Jan 31, 2014 10:36 pm

[QUOTE=ALLMarkMade] Not sure what you mean by remove the other...[/QUOTE]
I'm not that advanced in game making, I just set the things I want to remove to invisible. But if blades are 'hit', I can't find a way to select the right tower to make it go invisible.
B
5
Posts: 4
Reputation: 233

Post » Fri Jan 31, 2014 10:42 pm

Check the origin positions of your frames.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567

Post » Sun Feb 02, 2014 2:59 pm

Thank you!!
B
5
Posts: 4
Reputation: 233

Post » Sun Feb 02, 2014 4:10 pm

You may be able to check if the "other" is overlapping the one that got hit after the hit is detected too.

Or put an instance variable on both, and when you create the tower, give them both the same ID number. Then when one is hit, take care of it, and look for the matching ID to get it too.

Or use the single animation, and make sure the origin image points are in the same spot on each. When you made one taller, the origin point moved up a little. Either move it to the same pixel spot, or set them all to the bottom of the sprite.
B
230
S
62
G
33
Posts: 902
Reputation: 40,323

Post » Mon Feb 03, 2014 1:45 pm

[QUOTE=Paradox] You may be able to check if the "other" is overlapping the one that got hit after the hit is detected too.

Or put an instance variable on both, and when you create the tower, give them both the same ID number. Then when one is hit, take care of it, and look for the matching ID to get it too.

Or use the single animation, and make sure the origin image points are in the same spot on each. When you made one taller, the origin point moved up a little. Either move it to the same pixel spot, or set them all to the bottom of the sprite.[/QUOTE]
Nice solutions, thank you! I got it working with Lennaert's hint, but these are very usefull! Thanks!
B
5
Posts: 4
Reputation: 233


Return to How do I....?

Who is online

Users browsing this forum: David181, OBLIVION and 52 guests