Coins count effect

0 favourites
  • 6 posts
From the Asset Store
Shamans coin has suitable for workers who work from home because it has player names that must be played alternately
  • I think that all of you have seen this effect in a platformer games.

    When player touches the coin, it begins to move the coin's counter.

    So i tried to make something like this and it didn't work %(

    Here is my events:

    <img src="http://s2.ipicture.ru/uploads/20120217/TUK97g86.png" border="0" />

    The problem is that when player contact with the coin, this coin is removed and new one created on layer "interface" in which parallax = 0.

    So i need way to express coins coordinates relative to the "interface" layer.

  • why dont you spawn the coin on the layer that uses the right paralax setting?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • why dont you spawn the coin on the layer that uses the right paralax setting?

    What do you mean "right paralax setting"?

  • spray the coins using the particle system =]

  • vladoss

    Instead of destroying and re-creating the coin you can just use the "move to layer" action.

    Then here is the math you're looking for to move the coin to a location on the parallax 0,0 layer that is visually the same as the scrolling layout.

    coin | set position to (self.X-scrollx+WindowWidth/2, self.Y-scrolly+WindowHeight/2)

  • vladoss

    Instead of destroying and re-creating the coin you can just use the "move to layer" action.

    Then here is the math you're looking for to move the coin to a location on the parallax 0,0 layer that is visually the same as the scrolling layout.

    coin | set position to (self.X-scrollx+WindowWidth/2, self.Y-scrolly+WindowHeight/2)

    That's exactly what I needed! Thank you!

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