{"id":28,"date":"2018-05-20T18:50:42","date_gmt":"2018-05-20T18:50:42","guid":{"rendered":"https:\/\/blogs.scummvm.org\/pantherengine\/?p=28"},"modified":"2022-05-23T18:54:46","modified_gmt":"2022-05-23T18:54:46","slug":"pink-scripts-format","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/pantherengine\/2018\/05\/20\/pink-scripts-format\/","title":{"rendered":"Pink Scripts Format"},"content":{"rendered":"<p>In Pink engine scripts are stored as serialized objects.<\/p>\n<p>Let\u2019s look at Wanderlust logo\u2019s script<\/p>\n<p>&nbsp;<\/p>\n<div class=\"jetpack-video-wrapper caption-big\">\n<div style=\"width: 580px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-28-1\" width=\"580\" height=\"326\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blogs.scummvm.org\/pantherengine\/wp-content\/uploads\/sites\/31\/2022\/05\/Wanderlust-Interactive-Logo-2a86fLNcPbY.mp4?_=1\" \/><a href=\"https:\/\/blogs.scummvm.org\/pantherengine\/wp-content\/uploads\/sites\/31\/2022\/05\/Wanderlust-Interactive-Logo-2a86fLNcPbY.mp4\">https:\/\/blogs.scummvm.org\/pantherengine\/wp-content\/uploads\/sites\/31\/2022\/05\/Wanderlust-Interactive-Logo-2a86fLNcPbY.mp4<\/a><\/video><\/div>\n<\/div>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/blogs.scummvm.org\/pantherengine\/wp-content\/uploads\/sites\/31\/2022\/05\/carbon.png\" \/><\/p>\n<p>The execution starts from HandlerStartPage. The last Handler is\u00a0unnecessary.<\/p>\n<p>Firstly, Handler executes\u00a0SideEffectExit, which sets next executors.<\/p>\n<p>Then, Handler starts sequence.<\/p>\n<p>The sequence consists of SequenceItems.<\/p>\n<p>SequenceItem \u2013 sets action to actor.<\/p>\n<p>SequenceItemLeader\u00a0 \u2013 same as SequenceItem but action which it sets will be used as a mark of script\u00a0ending. In this example, the script ends when the music ends.<\/p>\n<p>SequenceItemDefaultAction \u2013 sets the action to the actor, but only if SequenceItem haven\u2019t executed for that actor.<\/p>\n<p>Also, sequence can consist of two or more subsequences.<\/p>\n<p>The execution is the same, but we stop before next leader while the previous subsequence is playing.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/blogs.scummvm.org\/pantherengine\/wp-content\/uploads\/sites\/31\/2022\/05\/carbon-1.png\" \/><\/p>\n<p>Thanks Douglas for great tool\u00a0<a href=\"https:\/\/carbon.now.sh\/\">Carbon<\/a><\/p>\n<div id=\"atatags-26942-608cefbdb9e23\"><\/div>\n<div id=\"jp-post-flair\" class=\"sharedaddy sd-like-enabled sd-sharing-enabled\">\n<div class=\"sharedaddy sd-sharing-enabled\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In Pink engine scripts are stored as serialized objects. Let\u2019s look at Wanderlust logo\u2019s script &nbsp; The execution starts from HandlerStartPage. The last Handler is\u00a0unnecessary. Firstly, Handler executes\u00a0SideEffectExit, which sets next executors. Then, Handler starts sequence. The sequence consists of SequenceItems. SequenceItem \u2013 sets action to actor. SequenceItemLeader\u00a0 \u2013 same as SequenceItem but action which [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/posts\/28\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pantherengine\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}