[SOLVED] Round and movement questions

WOW! absolutely WOW this engine has come a long way since I visited it last… Have been using Gamemaker for 4-5 years but as I don’t have time to keep up with everything I decided to revisit Gdevelop (apparently it was already installed and updated on my pc :slight_smile: )

After playing with it yesterday I have two questions in my mind:
1.
I have a countdown timer in my room. But the timer has to many decimals how do I round a number to 2 decimals?
In javascript I would properly use Math.round() or toFixed(), but I could not get it to work.

I have just made one scene with a player and in the scene event sheet I have the movement of the player (a =move left, set animation etc.)
If I make more scenes. How do these scenes reuse the player code?
Should I move it to a Player specific event sheet, that I call in each new scene?

Hi,

you will find the answers to your questions in the forum and the wiki:

  1. [Solved] How to show timer on screen with text object & how to Round it in decimal

  2. Link events [GDevelop wiki]

1 Like

What I did was create an external event with all the events of the player, the player is a global object that I use in several scenes. What I do is use link externals events from player and it works perfect.

1 Like

Thanks a lot this helps me!