Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Bug: Dialogue() function inside LeftClick and LeftDoubleClick events  (Read 5508 times)

0 Members and 1 Guest are viewing this topic.

Dionysius

  • Frequent poster
  • ****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 361
    • View Profile
    • On the Tracks of Dinosaurs

I have some secondary actor which has such script
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.
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Bug: Dialogue() function inside LeftClick and LeftDoubleClick events
« Reply #1 on: August 12, 2008, 08:19:49 PM »

this has been spoke about many times. See this thread

http://forum.dead-code.org/index.php?topic=2999.0
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Dionysius

  • Frequent poster
  • ****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 361
    • View Profile
    • On the Tracks of Dinosaurs
Re: Bug: Dialogue() function inside LeftClick and LeftDoubleClick events
« Reply #2 on: August 13, 2008, 05:23:43 PM »

metamorphium, your solution didn't help me. But I solve my problem by replacing Dialogue() 'function' with 'method'.
Logged
 

Page created in 0.09 seconds with 23 queries.