diff --git a/adventure-test-project/assets/model/00.chapter.json b/adventure-test-project/assets/model/00.chapter.json index cb56da0..a94584e 100644 --- a/adventure-test-project/assets/model/00.chapter.json +++ b/adventure-test-project/assets/model/00.chapter.json @@ -1,5 +1,5 @@ { -bladeEngineVersion: "4.0.2-SNAPSHOT", +bladeEngineVersion: "4.0.2", sounds: {}, scenes: { actor3d: { @@ -596,9 +596,28 @@ scenes: { y: 8.148743 }, verbs: { + "pickup.PICKED": { + id: "pickup", + state: "PICKED", + actions: [ + { + class: "Say", + actor: "$PLAYER", + text: "@basic1.ball.pickup.PICKED.0.text", + type: "SUBTITLE", + queue: false, + wait: true + } + ] + }, pickup: { id: "pickup", actions: [ + { + class: "ActorState", + actor: "ball", + state: "PICKED" + }, { class: "Goto", actor: "$PLAYER", @@ -850,6 +869,25 @@ scenes: { pickup: { id: "pickup", actions: [ + { + class: "IfActorAttr", + actor: "cube", + attr: "IN_INVENTORY", + value: "true", + caID: "619527093" + }, + { + class: "Say", + actor: "$PLAYER", + text: "@basic1.cube.pickup.1.text", + type: "SUBTITLE", + queue: false, + wait: true + }, + { + class: "End", + caID: "619527093" + }, { class: "Goto", actor: "$PLAYER", @@ -865,6 +903,10 @@ scenes: { { class: "PickUp", actor: "cube" + }, + { + class: "End", + caID: "619527093" } ] }, @@ -1262,7 +1304,7 @@ scenes: { actions: [ { class: "Say", - actor: "test_actions", + actor: "$PLAYER", text: "@01.test_actions.lookat.0.text", type: "SUBTITLE", queue: false, diff --git a/adventure-test-project/assets/model/00.properties b/adventure-test-project/assets/model/00.properties index 3f8e120..37db4f8 100644 --- a/adventure-test-project/assets/model/00.properties +++ b/adventure-test-project/assets/model/00.properties @@ -31,6 +31,8 @@ basic-prop-states.state.lookat.1.text=BLUE state. basic-prop-states.state.lookat.4.text=YELLOW state. basic-prop-states.state.lookat.6.text=NO state. basic-prop-states.state.text_=Click to change test state +basic1.ball.pickup.PICKED.0.text=Already picked! +basic1.cube.pickup.1.text=Already picked! ink1.example2.text=> Goto example 2 ink1.link.text=> Write with Ink tutorial inventory.a0.desc_=a0 diff --git a/adventure-test-project/assets/model/test-story.ink.json b/adventure-test-project/assets/model/test-story.ink.json index 014e2e2..f516176 100644 --- a/adventure-test-project/assets/model/test-story.ink.json +++ b/adventure-test-project/assets/model/test-story.ink.json @@ -1 +1 @@ -{"inkVersion":19,"root":[["\n","\n","ev","str","^> Scene 1","/str","/ev",{"*":"0.c-0","flg":4},"ev","str","^> Scene 2","/str","/ev",{"*":"0.c-1","flg":4},{"c-0":["\n",{"->":"scene1"},{"->":"0.g-0"},null],"c-1":["\n",{"->":"scene2"},{"->":"0.g-0"},null],"g-0":["done",null]}],"done",{"scene1":[{"->":".^.init"},{"init":[["^> Goto: actor=RED, target=target","\n","^> Animation: animation= GREEN.stand.left, wait=false","\n","^GREEN> Hi! This is a scene written with Ink!","\n","^GREEN> Ink is a narrative language developed by Inkle.","\n","^GREEN> Can you drive your game and story throught the Ink language?","\n",["ev",{"^->":"scene1.init.0.10.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-0","flg":18},{"s":["^RED> Yes, I can do everything with Ink.",{"->":"$r","var":true},null]}],["ev",{"^->":"scene1.init.0.11.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":18},{"s":["^RED> I don't think so.",{"->":"$r","var":true},null]}],["ev",{"^->":"scene1.init.0.12.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-2","flg":18},{"s":["^RED> I know nothing about Ink.",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"scene1.init.0.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.10.s"},[{"#n":"$r2"}],"\n",{"->":".^.^.g-0"},{"#f":5}],"c-1":["ev",{"^->":"scene1.init.0.c-1.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.11.s"},[{"#n":"$r2"}],"\n",{"->":".^.^.g-0"},{"#f":5}],"c-2":["ev",{"^->":"scene1.init.0.c-2.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.12.s"},[{"#n":"$r2"}],"\n",{"->":".^.^.g-0"},{"#f":5}],"g-0":["^GREEN> Well, you did it!","\n","end",null]}],null],"green":[["^$PLAYER> Hi!","\n","^GREEN> I don't want to speak with you.","\n",["ev",{"^->":"scene1.green.0.4.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","str","^Why?","/str","/ev",{"*":".^.^.c-0","flg":22},{"s":["^$PLAYER > ",{"->":"$r","var":true},null]}],["ev",{"^->":"scene1.green.0.5.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":18},{"s":["^$PLAYER > Ok. No problemo.",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"scene1.green.0.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.4.s"},[{"#n":"$r2"}],"^ You selected why.","\n","^GREEN> Because.","\n","^$PLAYER> Well. I don't understand, but ok.","\n","end",{"#f":5}],"c-1":["ev",{"^->":"scene1.green.0.c-1.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.5.s"},[{"#n":"$r2"}],"\n","end",{"#f":5}]}],null]}],"scene2":[{"->":".^.d1"},{"d1":[["^PLAYER> Hi!","\n","^PLAYER> How are you?","\n","^GREEN> Fine, thanks!","\n","^GREEN> Are you hungry?","\n",["ev",{"^->":"scene2.d1.0.8.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","str","^.","/str","/ev",{"*":".^.^.c-0","flg":22},{"s":["^PLAYER> No",{"->":"$r","var":true},null]}],["ev",{"^->":"scene2.d1.0.9.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":18},{"s":["^PLAYER> Yes.",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"scene2.d1.0.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.8.s"},[{"#n":"$r2"}],"^, I don't.","\n","^GREEN> Ok, let me know when you want some food.","\n",{"->":".^.^.g-0"},{"#f":5}],"c-1":["ev",{"^->":"scene2.d1.0.c-1.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.9.s"},[{"#n":"$r2"}],"\n","^GREEN> Would you like a hamburger?","\n",[["ev",{"^->":"scene2.d1.0.c-1.9.0.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-0","flg":18},{"s":["^PLAYER> Yes.",{"->":"$r","var":true},null]}],["ev",{"^->":"scene2.d1.0.c-1.9.1.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":18},{"s":["^PLAYER> No.",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"scene2.d1.0.c-1.9.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.0.s"},[{"#n":"$r2"}],"\n","^GREEN> Maybe you are too fat, here you have a banana.","\n",{"->":".^.^.^.^.g-0"},{"#f":5}],"c-1":["ev",{"^->":"scene2.d1.0.c-1.9.c-1.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.1.s"},[{"#n":"$r2"}],"\n","^GREEN> Well, here you have a banana.","\n",{"->":".^.^.^.^.g-0"},{"#f":5}]}],{"#f":5}],"g-0":["^PLAYER> Bye.","\n","end",null]}],null]}]}],"listDefs":{}} \ No newline at end of file +{"inkVersion":19,"root":[["\n","\n","ev","str","^> Scene 1","/str","/ev",{"*":"0.c-0","flg":4},"ev","str","^> Scene 2","/str","/ev",{"*":"0.c-1","flg":4},{"c-0":["\n",{"->":"scene1"},{"->":"0.g-0"},null],"c-1":["\n",{"->":"scene2"},{"->":"0.g-0"},null],"g-0":["done",null]}],"done",{"scene1":[{"->":".^.init"},{"init":[["^> Goto: actor=RED, target=target","\n","^> Animation: animation= GREEN.stand.left, wait=false","\n","^GREEN> Hi! This is a scene written with Ink!","\n","^GREEN> Ink is a narrative language developed by Inkle.","\n","^GREEN> Can you drive your game and story throught the Ink language?","\n",["ev",{"^->":"scene1.init.0.10.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-0","flg":2},{"s":["^RED> Yes, I can do everything with Ink.",{"->":"$r","var":true},null]}],["ev",{"^->":"scene1.init.0.11.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":2},{"s":["^RED> I don't think so.",{"->":"$r","var":true},null]}],["ev",{"^->":"scene1.init.0.12.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-2","flg":2},{"s":["^RED> I know nothing about Ink.",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"scene1.init.0.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.10.s"},[{"#n":"$r2"}],"\n",{"->":".^.^.g-0"},null],"c-1":["ev",{"^->":"scene1.init.0.c-1.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.11.s"},[{"#n":"$r2"}],"\n",{"->":".^.^.g-0"},null],"c-2":["ev",{"^->":"scene1.init.0.c-2.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.12.s"},[{"#n":"$r2"}],"\n",{"->":".^.^.g-0"},null],"g-0":["^GREEN> Well, you did it!","\n","end",null]}],null],"green":[["^$PLAYER> Hi!","\n","^GREEN> I don't want to speak with you.","\n",["ev",{"^->":"scene1.green.0.4.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","str","^Why?","/str","/ev",{"*":".^.^.c-0","flg":6},{"s":["^$PLAYER > ",{"->":"$r","var":true},null]}],["ev",{"^->":"scene1.green.0.5.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":2},{"s":["^$PLAYER > Ok. No problemo.",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"scene1.green.0.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.4.s"},[{"#n":"$r2"}],"^ You selected why.","\n","^GREEN> Because.","\n","^$PLAYER> Well. I don't understand, but ok.","\n","end",null],"c-1":["ev",{"^->":"scene1.green.0.c-1.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.5.s"},[{"#n":"$r2"}],"\n","end",null]}],null]}],"scene2":[{"->":".^.d1"},{"d1":[["^PLAYER> Hi!","\n","^PLAYER> How are you?","\n","^GREEN> Fine, thanks!","\n","^GREEN> Are you hungry?","\n",["ev",{"^->":"scene2.d1.0.8.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","str","^.","/str","/ev",{"*":".^.^.c-0","flg":6},{"s":["^PLAYER> No",{"->":"$r","var":true},null]}],["ev",{"^->":"scene2.d1.0.9.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":2},{"s":["^PLAYER> Yes.",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"scene2.d1.0.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.8.s"},[{"#n":"$r2"}],"^, I I'm not.","\n","^GREEN> Ok, let me know when you want some food.","\n",{"->":".^.^.g-0"},null],"c-1":["ev",{"^->":"scene2.d1.0.c-1.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.9.s"},[{"#n":"$r2"}],"\n","^GREEN> Would you like a hamburger?","\n",[["ev",{"^->":"scene2.d1.0.c-1.9.0.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-0","flg":2},{"s":["^PLAYER> Yes.",{"->":"$r","var":true},null]}],["ev",{"^->":"scene2.d1.0.c-1.9.1.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":2},{"s":["^PLAYER> No.",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"scene2.d1.0.c-1.9.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.0.s"},[{"#n":"$r2"}],"\n","^GREEN> Maybe you are too fat, here you have a banana.","\n",{"->":".^.^.g-0"},null],"c-1":["ev",{"^->":"scene2.d1.0.c-1.9.c-1.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.1.s"},[{"#n":"$r2"}],"\n","^GREEN> Well, here you have a banana.","\n",{"->":".^.^.g-0"},null],"g-0":[{"->":".^.^.^.^.g-0"},null]}],null],"g-0":["^PLAYER> Bye.","\n","end",null]}],null]}]}],"listDefs":{}} \ No newline at end of file diff --git a/adventure-test-project/ink-src/scene1.ink b/adventure-test-project/ink-src/scene1.ink index 2fab801..125a505 100644 --- a/adventure-test-project/ink-src/scene1.ink +++ b/adventure-test-project/ink-src/scene1.ink @@ -9,9 +9,9 @@ GREEN> Ink is a narrative language developed by Inkle. GREEN> Can you drive your game and story throught the Ink language? -* RED> Yes, I can do everything with Ink. -* RED> I don't think so. -* RED> I know nothing about Ink. ++ RED> Yes, I can do everything with Ink. ++ RED> I don't think so. ++ RED> I know nothing about Ink. - GREEN> Well, you did it! @@ -23,13 +23,13 @@ GREEN> Can you drive your game and story throught the Ink language? $PLAYER> Hi! GREEN> I don't want to speak with you. -*$PLAYER > [Why?] You selected why. -GREEN> Because. -$PLAYER> Well. I don't understand, but ok. --> END ++ $PLAYER > [Why?] You selected why. + GREEN> Because. + $PLAYER> Well. I don't understand, but ok. + -> END -*$PLAYER > Ok. No problemo. --> END ++ $PLAYER > Ok. No problemo. + -> END diff --git a/adventure-test-project/ink-src/scene2.ink b/adventure-test-project/ink-src/scene2.ink index 3ed692d..741280d 100644 --- a/adventure-test-project/ink-src/scene2.ink +++ b/adventure-test-project/ink-src/scene2.ink @@ -9,15 +9,15 @@ GREEN> Fine, thanks! GREEN> Are you hungry? -* PLAYER> No[.], I don't. ++ PLAYER> No[.], I I'm not. GREEN> Ok, let me know when you want some food. -* PLAYER> Yes. ++ PLAYER> Yes. GREEN> Would you like a hamburger? - ** PLAYER> Yes. + ++ PLAYER> Yes. GREEN> Maybe you are too fat, here you have a banana. - ** PLAYER> No. + ++ PLAYER> No. GREEN> Well, here you have a banana. - + -- - PLAYER> Bye. -> END