You do need some way to tell the script to only do the greeting once, Pluto, otherwise it'll continue to "greet" every frame because scripts are run every frame. Maneki, do you want the NPC to only say the greeting once or do you want them to say it again? If it's the former, Pluto's would work like this:
begin FW_greeting_N_niceshort DoOnce if ( GetDistance, Player < 150 ) if ( DoOnce == 0 ) say, "vo\N\m\Hlo_NM135.mp3", "Hail and welcome friend, hail!" set DoOnce to 1 endif endif end
If it's the later, you'll need to reset the DoOnce variable, but how and where you do that will depend on if this script is attached to the NPC or not.
Thanks Jac. Actually, I do want the NPC to say this line each time the player approaches. In testing Pluto's version, I found it worked fine, but when I returned to this NPC, he just gave me a generic greeting from that point on. I knew from past (very limited) experience that you can reset things by leaving the cell, so I found an example of that in some other script, and modified mine this way:
begin FW_greeting_N_nice short DoOnce if ( GetDistance, Player < 150 ) if ( DoOnce == 0 ) say, "vo\N\m\Hlo_NM135.mp3", "Hail and welcome friend, hail!" set DoOnce to 1 endif endif ;reset dialogue if ( CellChanged == 1 ) set DoOnce to 0 endif end FW_greeting_N_nice
This works, but is there a better way to reset the greeting (e.g. without having to leave the cell and re-enter it)? Let me know if there is. Thanks!
Also, I was wondering if it's possible to put TWO lines of voice together? For example, the first voice file might say, "You shouldn't be here," and the second says, "Get out of here!" Those are two separate mp3 files, so is there a way to make the NPC say both of them in sequence? I tried, but he just goes back to repeating only the first greeting infinitely, so obviously I did something wrong. Or maybe it can't be done? I would greatly appreciate any advice you have for this. Thanks again.