How do I make expanding animaton

Get help using Construct 2

Post » Thu Aug 14, 2014 7:42 am

Hi guys,

I am really new with Construct 2, I'm currently developing, a simple some kind of "avoid obstacles game" and have manage to make the basic of the game. The game is constructed in a top-down shooter/bullet hell fashion where the player must avoid all the bullets coming. However I am stuck in making some "bomb" animation for the game. I would really appreciate should the construct 2 masters here able to help me to solve on how to make this bomb/expanding animation.

I'm thinking on making explosion animation coming from the player, as an illustration, the player is a circle, I want to make an explosion which expands from the around the player to fill the whole stage and then that explosion started to disappear. the explosion really is just an expansion of the circle player itself.

You know it's kind of the animation of bomb power-ups in a top down shooter.

kind of like this (the outer circle is the bomb)

bomb.gif


I probably haven't tried everything and still tinkering with this problem my self, but a help would really be appreciated.


Thanks guuyss.
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 8
Reputation: 462

Post » Thu Aug 14, 2014 7:57 am

Something like this?

Create round sprite at player.x, player.y
set a variable Xplosion to 1

system if Xplosion = 1
- round sprite set width to roundsprite.width+1
- round sprite set height to roundsprite.height+1
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Aug 14, 2014 10:55 am

Hai LittleStain!!

Thank you so much for your help.

the animation works fine, however there are certain concern/further question that i want to ask.

- First one is how do i hide the animation at the beginning? since the animation start immediately the game starts and since its expanding in unlimited manner it will definitely reach the stage even if i put it outside the stage.

- second is, knowing that the animation is expanding throughout the game, will it affect the game say after quite few "bombs" is triggered?

- the third question is not related to the animation, however regarding score counts. I am currently calculating the score for every tick the game plays. unfortunately, the score will not stop calculating even if the game is over. How do I could make the calculation of the score stops when the player is dead/game over so that we know what is the score of during that play.

Thank you again for your help, sorry for barraging you with more questions tho

Thanks a bunch!!
B
3
Posts: 8
Reputation: 462

Post » Thu Aug 14, 2014 11:30 am

You should only trigger the animation when needed by adding conditions and variables..
You should also make events to stop the animation when needed..

You should only add to the score if game is not game over, so adding an extra condition would help..

so if player is alive - add to score
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Aug 14, 2014 5:17 pm

Okay, Im gonna try it, wish me luck bro..
B
3
Posts: 8
Reputation: 462

Post » Wed Oct 22, 2014 4:02 am

Hi little stain,

I hope you're able to help me further, i've managed to make the expanding animation. So as explained, the expanding animation work as a "bomb" which destroy all enemies. I also manage to make the enemies destroyed after it collides with the expanding animation.

Please note that I make the enemies to appear/spawn randomly from outside of the stage for every 5 seconds by using the system to create object every 5 seconds.

The problem is, after the bomb destroy the enemies that is on the stage, the enemy (object) is not spawning again. So after the "bomb" destroy the enemies, that is on stage, the instruction which makes the system to create enemy for every 5 seconds wont work since the enemies is not spawning.

This issue does not occur however if the way the bomb destroy the enemies is not by collision with the enemies. (for example: I make that every time the bomb button is released the enemies is destroyed). The expanding animation runs but the enemies is destroyed at the moment the button is released so the enemies is destroyed not as smooth as I wanted (compare with the enemies is destroyed when it collides with the expanding animation).

Can you help me with how to solve this?

Thanks in advance bro. Cheers.
B
3
Posts: 8
Reputation: 462


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests