Frame Timelines
In Gdevelop, frame timelines are used to create animations for objects. Animations are a sequence of frames that play in a specific order to give the illusion of movement. Frame timelines allow you to control the timing and appearance of these animations.
Adding Frame Timelines
To add a frame timeline to an object, follow these steps:
- Select the object in the Scene Editor.
- In the Object Properties panel, locate the "Animations" section.
- Click on the "+" button to add a new animation.
- Give the animation a name to identify it.
- Specify the duration of each frame in milliseconds.
- Upload or choose the frames to include in the animation.
- Adjust the order of the frames if necessary.
- Save your changes.
Editing Frame Timelines
Once you've added a frame timeline, you can edit its properties and frames:
- Name: You can change the name of the animation to make it more descriptive.
- Duration: Adjust the duration of each frame to control the speed of the animation.
- Frames: Add, remove, or reorder frames within the animation.
Playing Frame Timelines
To play an animation in your game, you can use events to trigger the animation:
- Open the Events Editor.
- Create an event that triggers the animation.
- Use the appropriate action to play the animation on the desired object.
- Specify the name of the animation to play.
// Example: Play an animation on a sprite object
Conditions:
- Object: [Sprite Object]
Actions:
- Sprite: Play animation
Animation: "Walk" // Replace with your animation name