Replacing pictures instead of clearing the screen?

Mareus
01 Sept 2014, 05:12
Is there a way to replace the pictures instead of clearing the screen and then showing a new picture? Basically what I am aware of, you can add a picture by "show picture" command, but if you don't clear the screen before, the layout you will get is basically this:
1. Original picture
2. Some text which you wrote while playing the game
3. New picture.

What I would like is to keep the text you wrote while playing the game, but replace the picture instead of dumping it under the text, because usually the screen centers on a new picture and then you have to scroll before you can get to inputting new commands in the game, and frankly I do not like that solution very much. The problem could be avoided if you could just replace the picture, so that you get this kind of layout:
1. Original picture that can change to New picture once certain conditions are met
2. Some text which you wrote while playing the game

Furthermore I am wondering if there is a command for showing ShowRoomDescription elements such as "You can see object X,Y,Z" and "You can go to place A,B,C" without having to necessarily show the whole room description. I just want to be able to call the function part which describes which objects you can see and where you can go. Is that possible? Note that I am aware of ShowRoomDescription, but that function also calls the text you wrote before and that is exactly what I want to avoid.

jaynabonne
01 Sept 2014, 06:49
To set the picture, call

SetFramePicture(picture_name)

To clear a picture, call

ClearFramePicture

jaynabonne
01 Sept 2014, 06:52
Onward...

To show the list of objects in the room, do something like:

s = FormatObjectList(game.pov.parent.objectslistprefix, GetNonTransparentParent(game.pov.parent), Template("And"), ".")
msg(s)

To show the list of exits, do:

s = FormatExitList(game.pov.parent.exitslistprefix, GetExitsList(), Template("Or"), ".")
msg(s)

It's not pretty, but it should work. (This is taken roughly from ShowRoomDescription.)

Mareus
01 Sept 2014, 07:50
jaynabonne wrote:Onward...

To show the list of objects in the room, do something like:

s = FormatObjectList(game.pov.parent.objectslistprefix, GetNonTransparentParent(game.pov.parent), Template("And"), ".")
msg(s)

To show the list of exits, do:

s = FormatExitList(game.pov.parent.exitslistprefix, GetExitsList(), Template("Or"), ".")
msg(s)

It's not pretty, but it should work. (This is taken roughly from ShowRoomDescription.)

It works partly, but there is a problem. Namely when I try to set a picture frame in the "before entering the room for the first time", I get no picture when entering the room. Yet it works when I do something to change the picture. The other code for showing places and objects works perfectly, Jay. So thanks for that.

jaynabonne
01 Sept 2014, 12:40
Perhaps you should do it in the "after" instead then? :) Otherwise, it sounds like the room change is clearing the picture.

jaynabonne
01 Sept 2014, 12:42
Or you could also set the room's picture attribute (whatever it's called) when you change the picture, to be sure.

Silver
01 Sept 2014, 16:01
Sounds similar to the problem I was getting with room descriptions when I set a clear screen script in the game setup.