Here is a real good example about case, end case, select, this helps in so many ways.
So I want my game player and other game guys to talk to each other in game and in seqence,so this is all I would do.
SELECT var //select var is all of my text for the whole text seqence
CASE 1: // all of the cases are the text and text numbers
text 100, 300, "var is one"
ENDCASE
CASE 2:
text 100, 300, "var is two"
ENDCASE
CASE 3:
text 100, 300, "var is three"
ENDCASE
CASE 4:
text 100, 300, "var is four"
ENDCASE
CASE 5:
text 100, 300, "var is five"
ENDCASE
ENDSELECT
if object collision(player,object to talk to)=1 and talk=1
var=1 // so var=1 so case:1 will be your text here
endif
if object collision(player,object to talk to)=1 and talk=2
var=2 // so var=2 so case:2 will be your text here
endif
if object collision(player,object to talk to)=1 and talk=3
var=3 // so var=3 so case:3 will be your text here
endif
if object collision(player,object to talk to)=1 and talk=4
var=4 // so var=4 so case:4 will be your text here
endif
if object collision(player,object to talk to)=1 and talk=5
var=5 // so var=5 so case:5 will be your text here
endif
And here is how my code looks like in my code if it helps at all
SELECT var
CASE 1: //first man talks to player
a# = typeWriter("Hello you little man,look's to me your on your way", 300, 650, 0.7, a#)
ENDCASE
CASE 2: //players first reply
b# = typeWriter("All I can say is Im suprised im was picked for this great adventure", 300, 650, 0.7, b#)
ENDCASE
CASE 3://first man talks back the second time
c# = typeWriter("Tell me about it,I should have been picked not you little man", 300, 650, 0.7, c#)
ENDCASE
CASE 4://player replys the second time
d# = typeWriter("Well, I have been trained small or not,so we will see how well I do.", 300, 650, 0.7, d#)
ENDCASE
CASE 5://first man talks for the last time
e# = typeWriter("Shure,just as we all have been trained,I wish you well in all of this.", 300, 650, 0.7, e#)
ENDCASE
ENDSELECT
if textstory1=1
set text size 40
var=1
endif
if textstory1=2
set text size 40
var=2
endif
if textstory1=3
set text size 40
var=3
endif
if textstory1=4
set text size 40
var=4
endif
if textstory1=5
set text size 40
var=5
endif
and here is all of my text story case and select sequence
SELECT talk1
CASE 1: //first man talks to player
a# = typeWriter("Hello you little man,look's to me your on your way", 300, 650, 0.7, a#)
ENDCASE
CASE 2: //players first reply
b# = typeWriter("All I can say is Im suprised im was picked for this great adventure", 250, 650, 0.7, b#)
ENDCASE
CASE 3://first man talks back the second time
c# = typeWriter("Tell me about it,I should have been picked not you little man", 250, 650, 0.7, c#)
ENDCASE
CASE 4://player replys the second time
d# = typeWriter("Well, I have been trained small or not,so we will see how well I do.", 250, 650, 0.7, d#)
ENDCASE
CASE 5://first man talks for the last time
e# = typeWriter("Shure,just as we all have been trained,I wish you well in all of this.", 250, 650, 0.7, e#)
ENDCASE
ENDSELECT
if OBJECT COLLISION(2, enemy(4).estates)=0
talk1=0
textstory1=0
talk=0
endif
if OBJECT COLLISION(2, enemy(4).estates)=1 and talk=0
textstory1=1
talk=1
endif
if textstory1=1 and OBJECT COLLISION(2, enemy(4).estates)=1
set text size 40
talk1=1
endif
If returnkey()=1 and OBJECT COLLISION(2, enemy(4).estates)=1 and returnkey()=1 and textstory1=1
While returnkey()=1
endWhile
textstory1=2
endIf
if textstory1=2 and OBJECT COLLISION(2, enemy(4).estates)=1
set text size 40
talk1=2
endif
If returnkey()=1 and OBJECT COLLISION(2, enemy(4).estates)=1 and returnkey()=1 and textstory1=2
While returnkey()=1
endWhile
textstory1=3
endIf
if textstory1=3 and OBJECT COLLISION(2, enemy(4).estates)=1
set text size 40
talk1=3
endif
If returnkey()=1 and OBJECT COLLISION(2, enemy(4).estates)=1 and returnkey()=1 and textstory1=3
While returnkey()=1
endWhile
textstory1=4
endIf
if textstory1=4 and OBJECT COLLISION(2, enemy(4).estates)=1
set text size 40
talk1=4
endif
If returnkey()=1 and OBJECT COLLISION(2, enemy(4).estates)=1 and returnkey()=1 and textstory1=4
While returnkey()=1
endWhile
textstory1=5
endIf
if textstory1=5 and OBJECT COLLISION(2, enemy(4).estates)=1
set text size 40
talk1=5
endif
If returnkey()=1 and OBJECT COLLISION(2, enemy(4).estates)=1 and returnkey()=1 and textstory1=5
While returnkey()=1
endWhile
textstory1=1
endIf
my signature keeps being erased by a mod So this is my new signature.