local CharacterHasSpoken = 0
function shop_keeper_init(e)
end
function shop_keeper_main(e)
if GetPlayerDistance(e) < 200 then
RotateToPlayer(e)
Prompt("Hello, how may i help you?")
if CharacterHasSpoken == 0 then
PlaySoundIfSilent(e,1)
CharacterHasSpoken = 1
end
else
CharacterHasSpoken = 0
end
end
Here is the storekeeper script, but iam not expert in scripting.How do add the audio play line to the reular soldier script?I dont need the "hallo how i can help u" text part.
I guess the command should be somethink like
"if character rotatetoplayer(e) then
PlaySoundIfSilent(e,1)
Right?