Well, I've had a good look at Ben's NPC talk script and loved it for my new game (Casual, first-person non-shooter) and got to thinking about KOTOR (Star Wars: Knights of the Old Republic) and other RPGs that have more, lets say "in-depth" NPC interaction. I then took a look at another good script: Airslide's PIN script. A glorious idea hit me like a ton of bricks (ouch)... I have been working on this for weeks with my lovely fiancee. We worked them out of the code and have a pretty good one now. Hope you guys find it useful and that it HASN'T been done before, because I'd feel like an idiot for searching with no avail. The script is simple and we have used it a lot, with as many as 3 Choices and 20 regular dialog, though more can be done, we don't need to ourselves. With this script, unlike some other talk scripts, you can have more than one running in a level, because, when you walk away from the talking NPC, the script starts back at state 10. I have attached the script and the media, but if you guys want, I can attach a demo of it in action. Here you go:
;Created by Wraith Staff
;This is a talking script that gives you a choice in what you say.
;When you walk away and come back the text resets.
;Can be used with multiple talking NPCs with slight changes.
;Two choices are safe, but pick the wrong one and you die!
;Header
desc = Multiple choice conversations
;Triggers
:state=0:plrdistwithin=60,hudreset,hudx=50,hudy=90,hudimagefine=gamecorehudsdemo1.png,hudname=talk1,hudhide=1,hudmake=display
:state=0:plrdistwithin=60,hudreset,hudx=50,hudy=90,hudimagefine=gamecorehudsdemo2.png,hudname=talk2,hudhide=1,hudmake=display
:state=0:plrdistwithin=60,hudreset,hudx=50,hudy=90,hudimagefine=gamecorehudsdemo3.png,hudname=talk3,hudhide=1,hudmake=display
:state=0:plrdistwithin=60,hudreset,hudx=50,hudy=90,hudimagefine=gamecorehudsdemo4.png,hudname=talk4,hudhide=1,hudmake=display
:state=0:plrdistwithin=60,hudreset,hudx=50,hudy=90,hudimagefine=gamecorehudsdemo5.png,hudname=talk5,hudhide=1,hudmake=display
:state=0:plrdistwithin=60,hudreset,hudx=50,hudy=90,hudimagefine=gamecorehudsdemo6.png,hudname=talk6,hudhide=1,hudmake=display,state=10
;What's your favorite food?
:state=10,plrdistwithin=60:rotatetoplr
:state=10,plrdistwithin=60:rotatetoplr,hudshow=talk1,hudfadeout=talk1
:state=10,plrdistfurther=60:hudhide=talk1,state=10
:state=10,plrusingaction=1:timerstart,state=15
:state=15,timergreater=500:state=20
;Choices
:state=20,plrdistwithin=60:rotatetoplr,hudshow=talk2,hudfadeout=talk2
:state=20,plrdistfurther=60:hudhide=talk2,state=10
:state=20,scancodekeypressed=79:timerstart,state=25
:state=20,scancodekeypressed=80:timerstart,state=26
:state=20,scancodekeypressed=81:timerstart,state=27
:state=25,timergreater=500:state=30
:state=26,timergreater=500:state=40
:state=27,timergreater=500:state=50
;Tuna...
:state=30,plrdistwithin=60:rotatetoplr,hudshow=talk3,hudfadeout=talk3
:state=30,plrdistfurther=60:hudhide=talk3,state=10
:state=30,plrusingaction=1:timerstart,state=35
:state=35,timergreater=500:state=60
;Ramen...
:state=40,plrdistwithin=60:rotatetoplr,hudshow=talk4,hudfadeout=talk4
:state=40,plrdistfurther=60:hudhide=talk4,state=10
:state=40,plrusingaction=1:timerstart,state=45
:state=45,timergreater=500:state=60
;Apples... DEATH!
:state=50,plrdistwithin=60:rotatetoplr,hudshow=talk5,hudfadeout=talk5
:state=50,plrdistfurther=60:hudhide=talk5,state=10
:state=50,plrusingaction=1:timerstart,state=55
:state=55,timergreater=500:plraddhealth=-300
;I'm leaving now!
:state=60,plrdistwithin=60:rotatetoplr,hudshow=talk6,hudfadeout=talk6
:state=60,plrdistfurther=60:hudhide=talk6,state=10
:state=60,plrusingaction=1:timerstart,state=65
:state=65,timergreater=500:state=2
:state=2,plrdistfurther=60:state=10
;End of Script
EDIT: Put my name as the creator since it's only based off of Ben's and Airslide's scripts, not really mods and noone knew I made it
Here's a list of things I'm going to add to this script:
Medic (Should be REALLY EASY... Just change the "hurt" to "heal")
Merchant (REALLY HARD... Based on Conjured Entertainment's "Cash Script")
Sit (Should be EASY, but for some reason ISN'T... Jordan Siddall)
Move(Should be EASY, but, again, ISN'T...mAcpo)
If you guys have any ideas for new MultiTalks... drop me a line or
if any of you better scripters don't mind; I could use a lot of help! Thanks - Wraith Staff
New sig in the process of being made