Skip to reading
Images, Carousels & Choice Controls

Know which ID the carousel returns

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

Figure 23. After browsing to Map Room, Read current reports its caption, entry ID and image asset.

Source table from Know which ID the carousel returns, page 27
Entry fieldNormal Image CarouselInventory Image Carousel
idThe image asset ID.The inventory item ID.
assetIdThe image asset ID used for the card.The item’s icon image asset ID.
captionThe asset’s assigned name.The inventory item’s assigned name.

For an inventory confirmation script, change the target GUI and carousel IDs to inventory_lab and carried_carousel. Use the returned id when looking up or acting on the inventory item; assetId identifies its picture.

Always handle an empty entries Array and an out-of-range index. After removing pictures or changing the inventory filter, the currently available entries can be different from the ones shown a moment earlier.

Do not store selected_index as a permanent story identity. Index 1 means the second current entry, and a changed source order can put another picture there. Store a stable entry ID when that identity matters.

Page 27 of 52Permalink
Go to page