'eat' verb crashing when item is in inventory

Hi there,

I'm having some trouble with an 'eat' verb.

I added the 'eat' verb in an object's 'verbs' tab, and assigned a 'run script' to it. I did not select the check box for 'edible' in the 'features' tab of the object, as this does not allow for scripts (that I can see).

When the player selects the object (in the world), an 'eat' verb displays in the 'places and objects' pane and when clicked, the script runs successfully:

SetForegroundColour ("BlueViolet")
PrintCentered ("<br/>You eat the starbloom mistletoe. It bites your tongue with its barbs. Ow!<br/>")
wait {
  msg ("You feel funny... Something isn't right. The world has taken on a new shade... a new colour...<br/><br/>Something beyond the veil of reality reaches out and touches you...<br/>")
  wait {
    PrintCentered ("SUDDENLY YOU ARE TRANSPORTED!")
    wait {
      MoveObject (player, fantastic realm)
      msg ("<br/>Somehow, eating the magical plant has granted you a brief glimpse at a realm far removed from the knowledge of man... a realm seldom seen by those without the sorcerer's ability.")
      SetTimeout (60) {
        SetForegroundColour ("Green")
        MoveObject (player, walesmountainsummit1)
      }
    }
  }
}

When the object is in the player's inventory (pane), however, and the 'eat' button is clicked, the script does run, but only gets so far:

SetForegroundColour ("BlueViolet")
PrintCentered ("<br/>You eat the starbloom mistletoe. It bites your tongue with its barbs. Ow!<br/>")
wait {
  msg ("You feel funny... Something isn't right. The world has taken on a new shade... a new colour...<br/><br/>Something beyond the veil of reality reaches out and touches you...<br/>")
  wait {
    PrintCentered ("SUDDENLY YOU ARE TRANSPORTED!")
    wait {

When the 'Continue' link is pressed in game (wait for key press command), the game freezes, and after several seconds, the program autoquits. As a result, I can't get a bug report to see what went wrong.

I'm not sure how to fix this, or why this would be occurring. I'd be grateful for any ideas.

Many thanks!


I don't see anything there that shoild be a problem.
Do either of the locations you're moving the player to have enter scripts that could be failing? Is there any problem if you send them to those locations from somewheree else?


Thanks! Fixed now. Turns out I put the room as a child of a character, which seemed to cause the issue.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums