Skip to content

Commit

Permalink
Fix some issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
bladecoder committed Jan 23, 2021
1 parent c548815 commit 88b9e5b
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 17 deletions.
46 changes: 44 additions & 2 deletions adventure-test-project/assets/model/00.chapter.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
bladeEngineVersion: "4.0.2-SNAPSHOT",
bladeEngineVersion: "4.0.2",
sounds: {},
scenes: {
actor3d: {
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -865,6 +903,10 @@ scenes: {
{
class: "PickUp",
actor: "cube"
},
{
class: "End",
caID: "619527093"
}
]
},
Expand Down Expand Up @@ -1262,7 +1304,7 @@ scenes: {
actions: [
{
class: "Say",
actor: "test_actions",
actor: "$PLAYER",
text: "@01.test_actions.lookat.0.text",
type: "SUBTITLE",
queue: false,
Expand Down
2 changes: 2 additions & 0 deletions adventure-test-project/assets/model/00.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion adventure-test-project/assets/model/test-story.ink.json
Original file line number Diff line number Diff line change
@@ -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":{}}
{"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":{}}
18 changes: 9 additions & 9 deletions adventure-test-project/ink-src/scene1.ink
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand All @@ -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



10 changes: 5 additions & 5 deletions adventure-test-project/ink-src/scene2.ink
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 88b9e5b

Please sign in to comment.