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: Help! Game freezes on Game.AddResponse  (Read 4726 times)

0 Members and 1 Guest are viewing this topic.

McCloud

  • wanna be game creator
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 38
  • McCloud
    • View Profile
    • Music by Jeremy McCloud
Help! Game freezes on Game.AddResponse
« on: September 23, 2005, 12:11:41 AM »

ok, I can't figure this one out.  I tried several different things to determine the problem or work around it.  I am trying to start a conversation with my Doctor entity where you can choose what you want to say, but I keep running into this strange bug.  This is my second "game test" the first one, I had no problem, but when I go and talk to the doctor now, in this new test, the game freezes, the choices don't show and I can't click or do anything else in the game once it reaches this point.

I tried using the code from WME Help:
Code: [Select]
Game.AddResponse(0, "Hello.");
Game.AddResponse(1, "How are you?");
Game.AddResponse(2, "I'll be going.");

var Res = Game.GetResponse();

and

Code: [Select]
function MyTestDialogue()
{
  var EndBranch = false;

  while(!EndBranch) // loop until the player ends this dialogue
  {
    // fill in the responses
    Game.AddResponse(0, "Hello.");
    Game.AddResponse(1, "How are you?");
    Game.AddResponse(2, "I'll be going.");

    // let the player choose one
    var Res = Game.GetResponse();

    // let the actor say the selected response
    actor.Talk(Game.LastResponse);

    // and now handle the selected one
    switch(Res)
    {
      case 0:
        // some code to handle response #0
        this.Talk("Hi mister.");
        break;

      case 1:
        // some code to handle response #1
        this.Talk("I'm fine, thank you.");
        break;

      case 2:
        this.Talk("Bye bye.");
        EndBranch = true;  // response #2 exits the dialogue
        break;       
    }
  }
}

But have the same problem.  I tried copying and pasting from my previous project as it's close to the same scene, but still have the same problem.

I can make my Doctor entity and my actor talk with out any problems, so it must have something to do with Game.AddResponse or Game.GetResponse. 

I've tried using the Molly actor as I thought it could be something wrong with my actor that I created.  Same problem.

WME doesn't generate any errors or logs for it, I've even checked the log files, nothing.  I even started a NEW project from scratch, and tested with a region entity.  Same Problem.  But when I load my previous game, the old version, it works fine, it works fine in the WME Demo. 

I thought maybe I was typing something wrong, so I downloaded UltraEdit and set it up, no errors were found.  What in the world can it me?!

Has anyone had this same problem?  What am I doing wrong?

Thanks
-McCloud
Logged
"How do you know what's real, when you only know of reality through your own mind?" - William Blake

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Help! Game freezes on Game.AddResponse
« Reply #1 on: September 23, 2005, 12:55:24 AM »

Hi,

I tried to copy your code and it works perfectly here. So I would seek the problem elsewhere. ;)
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

McCloud

  • wanna be game creator
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 38
  • McCloud
    • View Profile
    • Music by Jeremy McCloud
Re: Help! Game freezes on Game.AddResponse
« Reply #2 on: September 23, 2005, 08:26:53 AM »

The problem only occurs when I add the Game.AddResponse code.  If I delete it, it doesn't have problems.  I'm not sure what could cause this.  Perhaps it's something simple that I'm overlooking.  Thanks for checking it out though.
Logged
"How do you know what's real, when you only know of reality through your own mind?" - William Blake

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Help! Game freezes on Game.AddResponse
« Reply #3 on: September 23, 2005, 08:55:01 AM »

The only thing I can think of is that the response box is displayed off-screen, so the game is waiting for you to choose the response, but you can't see them. What game resolution are you using? The response box in WME demo (and in the default project template) is designed for 800x600. If your game runs in 640x480 that would mean the responses aren't visible.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

McCloud

  • wanna be game creator
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 38
  • McCloud
    • View Profile
    • Music by Jeremy McCloud
Re: Help! Game freezes on Game.AddResponse
« Reply #4 on: September 23, 2005, 09:02:06 AM »

Ok, I think I found the problem.  My scene is 800 x 480.  I wanted to make my scene to scroll from left to right but DIDN'T want it to scroll up and down.  I'm almost sure it has to do with the resolution I set.

I have the game set to 640 x 480 and the scene set to 800 x 480 so that it can do this scrolling.   Once I found this out, I tried changing the game resolution to 800 x 480 but it still doesn't fix the problem.

I'm not sure if WME can support it then.  Unless maybe the response box is hidden in an off screen coordinate.  If so is there a way to move it, or do I have to redo my renders to a different resolution?

-McCloud

Logged
"How do you know what's real, when you only know of reality through your own mind?" - William Blake

McCloud

  • wanna be game creator
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 38
  • McCloud
    • View Profile
    • Music by Jeremy McCloud
Re: Help! Game freezes on Game.AddResponse
« Reply #5 on: September 23, 2005, 09:07:35 AM »

Quote
The only thing I can think of is that the response box is displayed off-screen, so the game is waiting for you to choose the response, but you can't see them. What game resolution are you using? The response box in WME demo (and in the default project template) is designed for 800x600. If your game runs in 640x480 that would mean the responses aren't visible.

Can I move the response box?
Logged
"How do you know what's real, when you only know of reality through your own mind?" - William Blake

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Help! Game freezes on Game.AddResponse
« Reply #6 on: September 23, 2005, 09:08:58 AM »

We posted at the same time :)
Ok, so if your game is running in 640x480, you will have to modify the "response box" definition and resize/move it appropriately. The definition file is located at "interface\responses.def". You will need to change at least the AREA, X, Y, WIDTH and HEIGHT values to fit your game's resolution. Please referer to the docs for more details on response box definition files.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

McCloud

  • wanna be game creator
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 38
  • McCloud
    • View Profile
    • Music by Jeremy McCloud
Re: Help! Game freezes on Game.AddResponse
« Reply #7 on: September 23, 2005, 09:21:37 AM »

Quote
We posted at the same time
;D Yeah, it wouldn't let me post at first, said some else had made a post or something.  I didn't feel like retyping the information since it had all the answers already.

Quote
Ok, so if your game is running in 640x480, you will have to modify the "response box" definition and resize/move it appropriately. The definition file is located at "interface\responses.def". You will need to change at least the AREA, X, Y, WIDTH and HEIGHT values to fit your game's resolution. Please referer to the docs for more details on response box definition files.

 :-\ Man!  I knew it was something simple!  I was going nutts for a moment there.  I'm getting closer to finishing my little "test" game, I didn't want to have to start over.  Thank-you so much!

-McCloud
Logged
"How do you know what's real, when you only know of reality through your own mind?" - William Blake
 

Page created in 0.035 seconds with 21 queries.