Quote: "Its actually quite simple."
Yeah it is
This script do it with the stock sounds, but it can easily addapt to your needs+tutorial for more talks.
;Script description
desc = Character will greet player with speech when get close
;Starts level in idle posture, looking around slightly
:state=0:animate=1,state=1
:state=1,random=40:rotateheadrandom=10
;This is a additional line to show the player that he must press enter to talk
:state=1,plrdistwithin=70:fpgcrawtextsize=32,fpgcrawtextfont=Arial,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80,fpgcrawtext=Press ENTER to talk
;Talk as soon as get within range (or activated)
:state=1,activated=1:talk=audiobank\behaviours\hello.wav,state=2
:state=1,plrdistwithin=70,plrusingaction=1:talk=audiobank\behaviours\hello.wav,state=2
:state=1,plrdistfurther=90:state=0
:state=2,plrcannotbeseen:rotatetoplr
:state=2:lookatplr
:state=2,soundfinished=1:state=3
:state=3,plrdistwithin=90:lookatplr
:state=3,plrdistfurther=90,random=40:rotateheadrandom=10
;This is a additional line to show the player that he must press enter to talk
:state=3,plrdistwithin=70:fpgcrawtextsize=32,fpgcrawtextfont=Arial,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80,fpgcrawtext=Press ENTER to talk
:state=3,plrdistwithin=70,plrusingaction=1:talk=audiobank\behaviours\thug.wav,state=4
:state=4,plrcannotbeseen:rotatetoplr
:state=4:lookatplr
:state=4,soundfinished=1:state=5
;This is a additional line to show the player that he must press enter to talk
:state=5,plrdistwithin=70:fpgcrawtextsize=32,fpgcrawtextfont=Arial,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80,fpgcrawtext=Press ENTER to talk
:state=5,plrdistwithin=90:lookatplr
:state=5,plrdistfurther=90,random=40:rotateheadrandom=10
:state=5,plrdistwithin=70,plrusingaction=1:talk=audiobank\behaviours\aiko.wav,state=6
:state=6,plrcannotbeseen:rotatetoplr
:state=6:lookatplr
:state=6,soundfinished=1:state=7
;To add more talk(tutorial)(Delete this out of your script when finished)
;x=state value of the last line above(example: state=6,soundfinished=1:state=7 => x=7)
:state=x,plrdistwithin=70:fpgcrawtextsize=32,fpgcrawtextfont=Arial,fpgcrawtextr=255,fpgcrawtextg=255,fpgcrawtextb=255,fpgcrawtextx=50,fpgcrawtexty=80,fpgcrawtext=Press ENTER to talk
:state=x,plrdistwithin=90:lookatplr
:state=x,plrdistfurther=90,random=40:rotateheadrandom=10
:state=x,plrdistwithin=70,plrusingaction=1:talk=audiobank\behaviours\"your sound".wav,state=x+1
:state=x+1,plrcannotbeseen:rotatetoplr
:state=x+1:lookatplr
:state=x+1,soundfinished=1:state=x+2
;End of Script
Hope this helps and for more just ask me
Also I have to thanks, this script motivates me to script again. My to do list will be smaller now
Corno_1