Greetings,
Unfortunately, I cannot post the content of the XML file as I do not have access to the files on the server since I'm a GM and not an admin. I have done everything using the [xmledit command.
I'm trying to make an archer who will display an arrow shooting animation, make a shooting sound and then say a random text every 15 seconds when a player approaches and moves within 8 tiles.
It looks straightforward but I'm having problems with the pauses and delays.
I wanted the shooting animation and the sound to kick in simultaneously. At first I tried doing everything in a single XMLDialog but that didn't work. So I created one XMLDialog that handles the shooting animation (Depends On : -1 Action : SETONTHIS/ANIMATE,18,5,1,true,false,1 Range : 8 Reset : 00:00:15, Pre-Pause : 0, Pause : 0) and another XMLDialog that handles the shooting sound. (Depends On : -1 Action : SETONTHIS/SOUND,564 Range : 8 Reset : 00:00:15, Pre-Pause : 0, Pause : 0)
Until this point everything works beautifully. Every 15 seconds, the archer shoots and makes the sound. However, when I want to add the speech which should occur after the shooting, I have a problem. What I have done is I added another XMLDialog to the NPC which includes 12 different texts all of which depend on -1, Range of 8, Reset timer of 15 seconds, Pre-Pause of 3 seconds and Pause of 0 seconds. What I expect this to do is 3 seconds after the archer has shot, he will say one of the 12 texts randomly.
What actually happens is that the archer speaks 3 seconds after the first shot (as expected) but with every consequent shot, the delay increases.
I don't have a clue what might be going wrong. Theoretically, all of the 3 XML dialogs should reset themselves in 15 seconds and the shooting, animation and speech should start all over again but the speech delay piles up with every shot.
Any help or ideas will be appreciated...
Thank you...
I think that the issue is that one of your dialogs actually has an overall reset time of 18 seconds, not 15 (3 second prepause + 15 seconds reset), so they start out synched, but then slowly drift apart - 3 seconds more every time.
Try making the one with the 3 sec prepause reset after 12 seconds instead of 15.
You should actually be able to do this easily with one xmldialog. I'll give it a shot and post the results.
Thank you very much for your reply, how come I never thought of that
I'll test it right away and post the results...
It works beautifully now
Thanks a bunch ArteGordon...