make the explosion smaller and fade out

0 favourites
From the Asset Store
High quality sound effect pack, in the following categories: explosion
  • Hi, I'm a newbie here.

    I just started using Construct2 few days ago.

    I love this program so much.

    I follow the tutorial of guy shooting monster.

    Right now I want to make the explosion become smaller and fade out, otherwise it'll be on the scene and block Player's vision.

    I think it should be in edit animaion, but I don't know how to set it.

    Anyhelp,please?

  • Hello imissu2

    To make the explosion smaller click on, and select your explosion sprite. Then on the left in the properties window were it says size you can change the size of your sprites there.

    To make it fade out, in the properties window select add/edit next to were it says edit behaviors. In the new window click on the add new button. Then in the new window under general select Fade then close window, and go back to properties window, and were it says fade out time you can adjust the speed. 0.5 is a good speed for an explosion.

    Hope this helps

  • Hello, Wink.

    Thank for your help. The fade works well.

    But for make it smaller. I want to play with explosion.

    Like when it explore, then it will get smaller and fade out of the scene.

  • You mean you want to make it smaller as it plays?

    Make a new event, "Every tick", and "Explosion - 'Exploding' animation is playing" with the conditions "Explosion - Set width to Explosion.Width-1" and Explosion - Set height to Explosion.Height-1".

    You can change the "-1" to be bigger to make it shrink faster, or smaller to make it shrink slower. It might need to be smaller -- getting a pixel smaller every tick will make it shrink really fast.

    Hope that helps. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you so much SullyTheStrange. :D

    I'm so exciting.

    Now I'm looking for "Playagain" button Tutorial.

  • To restart the level? You can use a trigger like, for example, "On key pressed - P" along with the action under System "Go to Layout" and set it to the current layout, which should restart it. However, I think the player will still be standing in the same spot as before, not the original spot, so you should also use the "Player - Set position to" and put in the starting X and Y.

  • SullyTheStrange :

    I like to have a blackscreen say "Gameover" with the "Restart level" Button.

    Can we do that in C2?

  • Sure thing. But it'll take a bit of work.

    You need to have a black sprite set over the screen, with an opacity of 0 so you can see through it while playing. Preferably on a layer ath the very top, where there Parallax on the left side is set to 0,0 -- that means it won't scroll, so it'll always be over the screen. When your health hits 0 and you want the black screen to appear, use the opposite of the Fade event you used to make the explosion fade. Instead of disappearing(going from 100 opacity to 0), like the explosion, you want the black screen to reappear(going from 0 opacity to 100).

    Once it's there, you can either use a sprite that says "Game Over" or have a text object display the words. From there, you can use the events I suggested before to press a button and restart the level.

    Hopefully I explained that well enough.

  • Hi,SullyTheStrange.

    I tried add Gameover layout, put the restart button on it.

    and add action

         system >set score to 0

         system >Go to main game.

    Right now the problem is :

    1. When start, it jump to Gameover page first.

    2. After click play again, the Button still in the main page.

  • Hm... Do you think you could post your .capx using Dropbox? It would be a lot easier to help if I could see exactly what you're doing.

    If you've never done that before, it's definitely something to learn. Everyone here uses Dropbox to share files -- you make an account at dropbox.com, download the manager, and now you have a new folder on your computer called "Dropbox", which should be under Desktop and Downloads in Windows Explorer or whatever they call that. Next, move your .capx file into the Public folder of Dropbox and go to the website, copy the public link, and post that here. Then we can download it and help you further.

  • Thank you so much.

    I have dropbox acc. I rarely use it. but here's the link

    dl.dropbox.com/u/32432498/doodle02.capx

  • Well, I fixed one of the problems, where it goes to the GameOver layout. You have to go to Project Properties on the right panel and set "First layout" to "doodle01". Also keep in mind that when you click "Run layout", it runs the last one that's active, so if you're looking at the GameOver layout and click Run, it'll go to that one first.

    As for the button not disappearing, I can't seem to make that go away. I'll keep trying.

  • I've got the button to disappear, but something is definitely strange here. Here's the file: http://dl.dropbox.com/u/34306693/doodle03.capx.

  • Well the disappearance of the button is set on the same action as the "got to layout". You might wanna put a "Wait" action just after "Set playagain invisible" so that there will be a delay between the disapearance of the button and the fact of going to the next layout.

  • Thank you so much you guys.

    It's all work now.

    SullyTheStrange : at first, I set First layout to "doodle01" and it still start with gameover. After I read your comment again and click on the "doodle01" layout to be activate before I run test. It's work, hehe.

    Zenox98 : That's awesome, thank you for help me fix the bug.

              I quite not understand why it had to write like this.

              Seem like the command destroy can't make the button disappear.

    Kyatric : I tried your comment too, but because the problem is already fix by Zenox >invisible it. Thank for your help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)