Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Remove Response from the dialog?  (Read 3016 times)

0 Members and 1 Guest are viewing this topic.

Yakuzza

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 50
    • View Profile
Remove Response from the dialog?
« on: September 26, 2012, 07:12:54 PM »

Hi!
How can i remove a response form the dialog?
Let's say when player clicks Response A, Response B gets removed
Thanks!
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: Remove Response from the dialog?
« Reply #1 on: September 26, 2012, 08:04:42 PM »

You are looking for something like this:

Code: WME Script
  1. var lineAspoken = false;
  2.  
  3. var dialogueEnd = false;
  4. Game.StartDlgBranch("testBranch");
  5. while (!dialogueEnd)
  6. {
  7.   Game.AddResponseOnce(1,"trigger line");
  8.   if (!lineAspoken) Game.AddResponse(2, "something");
  9.   Game.AddResponseOnce(3,"end dialogue");
  10.  
  11.   var response = Game.GetResponse()
  12.  
  13.   switch (response)
  14.   {
  15.      case 1:
  16.          lineAspoken = true;
  17.          break;
  18.      case 2:
  19. // do something
  20.          break;
  21.     case 3:
  22.          dialogueEnd = true;
  23.          break;
  24.    }
  25.  
  26. }
  27.  
  28. Game.EndDlgBranch("testBranch");
  29.  
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Yakuzza

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 50
    • View Profile
Re: Remove Response from the dialog?
« Reply #2 on: September 26, 2012, 08:50:10 PM »

thanks!
you're a lifesaver!
Logged
 

Page created in 0.027 seconds with 23 queries.