Carousel actions in scripts and nodes
extends "res://scripts/runtime/script_base.gd"func run(_context: Dictionary = {}) -> Variant:
await CarouselAddImage({
"guiId": "gallery_lab",
"elementId": "reference_carousel",
"assetId": "brass_key_art"
})
await CarouselNext({
"guiId": "gallery_lab",
"elementId": "reference_carousel"
})
return trueCreate a GDScript record with this source, Apply Changes and assign it to an interaction. Add Image appends the key; Next advances one position. Next does not automatically jump to the last added picture.
Figure 22. A visual graph can use Carousel: Next Image with the same two target IDs.
For visual scripting, connect the intended entry node to the carousel action node. An action list uses the same fields. You can place another story action before or after the navigation step without changing the carousel’s source.
Change GUI Element Property can rebuild a normal carousel. Set its layout and style before adding temporary runtime entries, or reconstruct the entries deliberately after a rebuild.
