How do I get fireworks to go up then down upon destroy?

0 favourites
  • 5 posts
From the Asset Store
Set of tiles to create a map for top-down games with island theme
  • Hi,

    New to Construct...loving it so far.

    In my first game I have my character colliding with a target object. In order to 'celebrate' the achievement I'd like a 'fireworks'.png to go off....ideally fireworks would briefly go up, then down and fade.

    I can get the fireworks to appear via spawn another object...I can also get them to fade....but don't know how I can get them to firstly travel briefly up and then go down before fading.

    Thanks for any clues!

  • Firework is active -> setfirework position (Self.x, Self.y - speed * dt)

    X Firework is active -> setfirework position (Self.x, Self.y + speed * dt)

  • Thanks for the reply Skelooth...think I need to watch some more tutorials first before I can understand how what you've written actually is plugged in! (ie. I don't really understand where I can even choose "firework is active")

    I'm probably trying something which is currently a bit beyond my level of understanding:)

    Anyway thanks for the pointer! Appreciate your time.

  • Sorry I should have explained better.

    Lets say you have a firework sprite, it looks like a rocket. It has an animation called explode as well. Your event sheet might look something "sort of like"

    System->Every Tick

    -> rockets animation = default -> rocket.y - speed * dt

    -> rockets animation = explosion -> rocket.y + speed * dt

    -> rocket height = top of sky -> rocket.set animation to explostion

    https://www.scirra.com/manual/115/sprite

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just use particles, set the angle to 270 and it will go down and fade automatically.

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