How do I implement collectible coins in a platformer game going directly to the HUD?

0 favourites
  • 1 posts
From the Asset Store
112 High-Quality Coins and Chest SFX specially crafted for video games
  • Hi guys!

    I'm developing a platform game where collectible coins automatically go to the HUD in the top left of the screen when the character collects them in the stages, as in the image below:

    Since I couldn't do it using the bullet and Line of Sight behavior (!!!), I resorted to Lerp and/or Position to do it successfully.

    However, since the game's coins and the HUD are on different layers, the last coins collected are always shifted several pixels forward when they are collected, causing a strange effect.

    I tried to solve it using Viewport expressions and creating two variables (TargetX and TargetY), but I was unsuccessful (see image below).

    Does anyone have any suggestions on how to solve this in C2?

    Thank you in advance!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)