I had that line in because one of the areas I had used it, there is an NPC right beside a switch. I have that line in place since I am activating the switch. However, the script works even if you remove that line and will not have to use action.
Modified Code:
;Artificial Intelligence Script
;Header
desc = game conversation
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=[point to the image],hudname=img1,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=160:rotatetoplr
:state=10,plrdistwithin=60:rotatetoplr,state=20
:state=20,plrdistwithin=60:rotatetoplr,hudshow=img1,hudfadeout=img1
:state=20,plrdistwithin=60,plrusingaction=1:state=40
:state=20,plrdistfurther=60:state=40
;End of Script
I set the state=40 because there is no state=40 and had assumed by doing it this way, it terminates the script once all conditions are met. I'm still learning the scripting myself, but it seems to be working exactly how we want it.
@ Nickydude, I hope that helps you out.
Cheers
Mike