How do I create disappearing notifications

0 favourites
  • 5 posts
From the Asset Store
"Easy Local Notifications" enhances games with customizable local notifications.
  • Basically I would like to create disappearing notification type of boxes.

    Scenario: Creating a game where you create a product and then sell it.

    Intended Action: Looking to create a box towards the top right hand corner of the screen, showing name of product and profit. Multiple products can show up at once, so I would like the top one to disappear say after an in-game month and then any other products would move up the screen taking its place.

    It would look similar to when you develop a game in game dev tycoon.

    Any advice greatly appreciated.

  • Hi,

    It is simply a box and a text on top of it, both with FADE behavior.

    So after X happens you:

    1) create the box on top right

    2) create the text on top of the box

    3) set the text what it should say

    and you can set FADE to for example 2 seconds wait 1 second disappear and the 2 objects will go away by themselves

    Good luck!

  • Thanks for the swift reply,

    I was able to do that but what I was stuck with was after the top box disappeared, I wanted the second box under it to move up and take its place.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd use an array; sort the array however and then pop a cell when a notification disappears.

    Since the notifications' UIDs are based on their position in the array, they'll automatically move up.

    e.g.

    for 0 to array.Width

      pick notification with UID array.At(loopindex)

      set notification.Y to (0 + loopindex * notification.Height)

    You can also use lerp or some other method to move them more gradually, but that means you have to set their position correctly when they are first created.

    The fade behavior is for the visual effect, and the array takes care of the rest.

    https://drive.google.com/open?id=0BzomH ... 2ZRQ2tTRVE

  • you can always bullet anything to any location

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