Experimental browser for the Atmosphere
Once allows you to say some content will only ever be seen once, without wasting single-use variables. Not only that, but it can have a condition - Yarn Spinner will run this content ONCE (one time), ONCE (after) that condition first becomes true. This is great for content like NPC intros!
May 7, 2025, 4:56 AM
{ "uri": "at://did:plc:ogwyns53xduhyolmf7xvbcnp/app.bsky.feed.post/3lokmc6bhl22o", "cid": "bafyreigjjqzxwiopyyx7uhoxzks6mftnj5l72k43hwwturhj7qzfoh6w6q", "value": { "text": "Once allows you to say some content will only ever be seen once, without wasting single-use variables. Not only that, but it can have a condition - Yarn Spinner will run this content ONCE (one time), ONCE (after) that condition first becomes true.\n\nThis is great for content like NPC intros!", "$type": "app.bsky.feed.post", "embed": { "$type": "app.bsky.embed.images", "images": [ { "alt": "Tile shows a feature for Yarn Spinner V 3: \"Once\" Statements. The image notes that this feature is out now and more information can be found at yarn spinner dot dev slash V 3. The main content of the tile is an annotated code example that reads \"A common pattern in Yarn scripts where segments of characters are revisited is to define something the player should only ever see one time. Usually, something like this:\" \nSource code for a dialogue option is then shown, with a condition attached which says to only offer this option if the variable Asked NPC Name is false. If run, this option immediately sets this value to true. This means this option could only ever be run once, yet declares a whole variable to make that so. A caption continues... \"so we've made a new keyword called 'once'. It's like an if statement for 'this block or option has never run before'. Another code block shows what the above snippet looks like with the 'once' functionality. It is the same option again, now just marked with the keyword 'once'.", "image": { "$type": "blob", "ref": { "$link": "bafkreicyyhyg2hlu5lsh7gszbvb25actshwto5drc5tcmcaz3ozjzcfazq" }, "mimeType": "image/jpeg", "size": 817526 }, "aspectRatio": { "width": 1920, "height": 1080 } } ] }, "langs": [ "en" ], "reply": { "root": { "cid": "bafyreietemg4guab533v6ozdq7t3p444uiszngdfsqxztcmid3xbqqjgm4", "uri": "at://did:plc:ogwyns53xduhyolmf7xvbcnp/app.bsky.feed.post/3lokmbqaoak2o" }, "parent": { "cid": "bafyreihqekj6bqxqjxmkmvrzn3dzkl7b3twchjwxug4jxwakgfrybozxjy", "uri": "at://did:plc:ogwyns53xduhyolmf7xvbcnp/app.bsky.feed.post/3lokmbzft422o" } }, "createdAt": "2025-05-07T04:56:46.239Z" } }