31
Bug reports / Bug: Dialogue() function inside LeftClick and LeftDoubleClick events
« on: August 12, 2008, 04:57:06 PM »
I have some secondary actor which has such script
When I click on this person, the dialogue branch starts. But when I doubleclick - the new dialogue branch starts from the beginning. And vice versa.
Code: [Select]
on "LeftClick" {
LeftClick();
}
on "LeftDoubleClick" {
LeftClick();
}
function LeftClick() {
//some code with actor.GoTo method which depends on the type of click
Dialogue();
}
function Dialogue() {
Game.StartDlgBranch("NewDialogue");
var EndBranch = false;
while(!EndBranch) {
Game.AddResponseOnceGame(0, "/speech0404/");
//more responses
var Res = Game.GetResponse(true);
switch(Res) {
case 0:
//some code
break;
//more cases
}
}
Game.EndDlgBranch();
}
When I click on this person, the dialogue branch starts. But when I doubleclick - the new dialogue branch starts from the beginning. And vice versa.