13. Control a carousel with actions
Use external Buttons when you want navigation somewhere other than the built-in arrows. The same actions can be used in a GUI event, an action list or a visual script.
1. Add a Button beside the carousel and give it the caption Next.
2. In Events, choose Click → Carousel: Next Image.
3. Set GUI to Reference Gallery and Carousel to Reference Carousel.
4. Add a Previous Button using Carousel: Previous Image.
5. Run the game and confirm that both external Buttons browse the same central carousel.
Figure 20. An external Next Button targets the gallery GUI and its carousel element.
| Shared action | Purpose |
|---|---|
| Carousel: Previous Image | Step backward. |
| Carousel: Next Image | Step forward. |
| Carousel: Add Image | Add a picture to a normal Image Carousel. |
| Carousel: Remove Image | Remove one matching picture from a normal gallery. |
| Carousel: Clear Images | Clear the normal gallery’s current authored and added pictures. |
Keep targets specific. Supplying the GUI and element ID makes it clear which gallery should respond when your game has several.
