Animate Title Logo on screen...

0 favourites
  • 8 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • Hi guys, it seems that i'm stuck on the simplest task. How can i animate my game logo moving automatically from offscreen left to center of the screen while changing size from small to big in the simplest of ways. Do i have to use behaviors or can it be done through the set position commands. Any samples will be greatly welcomed. Thank you...

  • Set its x to this:

    lerp(self.x, WindowWidth/2, 0.8*dt)

    Hope that helps, Let me know if you need me to explain it to you.

  • I mean set its x to that through events by the way <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Thank you, smitchell. I am not at all familiar with lerp, can you explain how this works. Thanks for your prompt response.

  • Explanation of lerp - LINK from the how do I FAQ

    For the size you can lerp it too, or check in the FAQ there's an example listed in the "sprite" section.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Lerp takes 3 perameters, a a, b and c.

    the a is allways the start of what your lerping, It tends to only work if you call something like: sprite.opacity. ect then b is what you want it to lerp to, so if i want the sprite to animate from a opacity of 100 to 0 then i set b to 0. And c is the time it takes to do it. Usually 0.8 is a nice number buy you can play around with it. and then you times the number by dt this just makes things happen in real time.

    So for a opacity of 100 to 0:

    Sprite.setOpacity{lerp(Sprite.Opacity, 0, 0.8*dt)}

    To animate its x position to the center of the stage:

    Sprite.setX{lerp(Sprite.x, WindowWidth/2, 0.8*dt)}

    To animate its y to center of stage:

    Sprite.setY{lerp(Sprite.y, WindowHeight/2, 0.8*dt)}

    Hope that was some help.

  • smitchell, thank you for explaining something that seems complex in a such simple manner. LERP is definitely going to be my new friend. Hope this also helps others as well. Going to start applying it right away.

  • Thanks for pointing me to the right links!

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