Picture show error

● ARCHIVED · READ-ONLY
Started by BreezyPeazy 7 posts View original ↗
  1. I'm trying to create an event to show a picture when the player presses the action button on a painting, and then make it go away if you press any other button or walk away.

    The event is
    Event 1
    Trigger: action button
    Show picture 1
    Control switches: Close picture=ON

    Event 2
    Paraell process
    Condition Control switch: Close picture=ON
    Erase picture 1

    In playtest it shows the picture and then crashes with an error:
    Script 'sprite_picture' line 54 no method error occuredUndefined method width for nil:nilclass

    I don't have any special scripts, just the basic stuff it comes with. Using the Lite version.
  2. To get rid of the error, try adding a Wait 5 frames after the Show Picture command. Or your error might be happening because event 2 runs as soon as the switch is turned on, and then the picture is immediately erased again, so it might erase the picture before it's even finished displaying. The Wait should help with that, too.

    However, it's not going to work the way you want - with your events, as soon as the picture is displayed, it's going to be erased, without waiting for the player to walk away or press another button.


    An alternative might be to just put it all into a single event, with action button trigger

    Show Picture 1
    Show Text (no text, set to bottom, transparent background)
    Erase Picture 1


    The show text makes it wait for user input, but as there's no text and no background it's hardly noticeable - there's just the tiny little arrow right at the bottom of the screen. This would require player input to erase the picture though.
  3. I changed it to the single event you suggest and it showed the picture, but when any action is done it crashes with the same error

    EDIT: it works fine now that its not centered for some reason
  4. centering has nothing to do with it.

    Could you please show a screenshot of your event, a screenshot of the error, and another of your Scripts list, so we can see any custom scripts you've added?

    Also, are you using VX or Ace? Your profile says you're using VX, but you posted in the Ace forum.
  5. 2q3ok02.png[/IMG]
    uh..this one?

    jb2yw4.png[/IMG]
    All I did was change it from middle to upper left with the coordinates shifting it to the middle, and now it works. I don't know why either.

    My scripts are just the normal scripts, i havent changed anything from startup. Here's the section of the code that gave an error when the image was centered
    sawp46.png[/IMG]
  6. Shaz said:
    Also, are you using VX or Ace? Your profile says you're using VX, but you posted in the Ace forum.

    Actually, there may be an old bug with showing pictures, but I can't remember if it was VX or Ace and you haven't said which you're using (I can't view the pics from my work pc). Maybe do a search to see if you can find anything about a Show Picture Bug?
  7. Even from my home PC I can't see your images.