I am having a little issue with the following script, and I am hoping someone can help me out here. Instead of using voice actors and such, I want to use HUDs for text to display. When the player gets within 100 of the entity, the first HUD displays with no problem, and then waits for the player to press the Enter key. However, when I press the enter key once, the script goes all the way to State 8 instead of going to state 2. When this happens, all custom huds disappear, and then I have to back away from the entity and approach it again. However, the entity then shows the very last HUD instead of any of the others.
The code:
:always,plrdistwithin=100:rotatetoplr
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\timepeace\level 1\desksgt1.tga,hudname=ds1,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\timepeace\level 1\desksgt2.tga,hudname=ds2,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\timepeace\level 1\desksgt3.tga,hudname=ds3,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\timepeace\level 1\desksgt4.tga,hudname=ds4,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\timepeace\level 1\desksgt5.tga,hudname=ds5,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\timepeace\level 1\desksgt6.tga,hudname=ds6,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\timepeace\level 1\desksgt7.tga,hudname=ds7,hudhide=1,hudmake=display,state=1
:state=1,plrdistwithin=100:hudshow=ds1
:state=1,plrdistwithin=100,scancodekeypressed=28:hudunshow=ds1,state=2
:state=1,plrdistfurther=101:hudunshow=ds1
:state=2,plrdistwithin=100:hudshow=ds2
:state=2,plrdistwithin=100,scancodekeypressed=28:hudunshow=ds2,state=3
:state=2,plrdistfurther=101:hudunshow=ds2
:state=3,plrdistwithin=100:hudshow=ds3
:state=3,plrdistwithin=100,scancodekeypressed=28:hudunshow=ds3,state=4
:state=3,plrdistfurther=101:hudunshow=ds3
:state=4,plrdistwithin=100:hudshow=ds4
:state=4,plrdistwithin=100,scancodekeypressed=28:hudunshow=ds4,state=5
:state=4,plrdistfurther=101:hudunshow=ds4
:state=5,plrdistwithin=100:hudshow=ds5
:state=5,plrdistwithin=100,scancodekeypressed=28:hudunshow=ds5,state=6
:state=5,plrdistfurther=101:hudunshow=ds5
:state=6,plrdistwithin=100:hudshow=ds6
:state=6,plrdistwithin=100,scancodekeypressed=28:hudunshow=ds6,state=7
:state=6,plrdistfurther=101:hudunshow=ds6
:state=7,plrdistfurther=101:state=8
:state=8,plrdistwithin=100:hudshow=ds7
:state=8,plrdistfurther=101:hudunshow=ds7
Anybody have any clue why this is happening? Shouldn't the code move to state 2, and then wait for me to hit enter, and then when that happens state 3, and so on?
Priest of the Church of Joe Wood
In memory of Nanee. 9/1/1993 - 5/16/2009. Rest in Peace, little girl.