Inform 7 images/glulx: Problems with location images

Hey everyone, im having some trouble with location images and inserting simple graphical windows.

the code all works fine and the images all appear in the allocated section (left hand side in my game) but when i enter another location the image for that room prints over the top of the last one. how can i stop this?

any help is welcome thankyou

It’s hard to say for sure w/o a glimpse of your code. What it sounds like, though, is that you are using your own custom drawing rule, but forgot to include a phrase to clear the window before the actual drawing happens. The most common way to clear with SGW would be:

blank window to graphics background color

followed immediately by whatever phrase invokes your drawing rule.


I’m just using the standard graphic rules that come with the extension simple graphic rule. i’ll give you a sample of my code: [code]Rule for starting the virtual machine:
now the current graphics drawing rule is the standard placement rule.

Carry out looking:
blank window to graphics background color;
follow the current graphics drawing rule.

The graphics background color is g-white. Graphics window position is g-left.

Figure of bedroom is the file “panel2.jpg”. [/code]

Now, the game has stopped showing image locations and simply prints out a blank screen instead, any movement or examining only prints out the release cover art :frowning: im stuck

I don’t see any problem with that code, except that since you’re using one of the built-in drawing rules, you don’t need to clear the window manually; that’s pretty minor, though–just makes things a bit slower (probably not even noticeable on most systems).

But of course, that’s not the full code needed to implement the feature you’re going for; you’d have to put all of the relevant code up for us to try and diagnose what’s going on.

Have you tried using the Location Images extensions with SGW? That automates the whole thing, and I think the result would be exactly the same as the code you are trying to write. If you use Location Images, all you need to do for each room is write “The Llama Creche is a room. The room illustration is Figure of Llamitas Nursing”.