• Tutorials

  • Home
  • GPDL $SMALL_PICTURE

    DungeonCraft Help Home

    Used to change the small picture being displayed during the text event that initiated the GPDL program function.

    ** Important ** Warnings are in order here:

    The file you specified must be present.

    A small picture must already be displayed.

    The change is semi-permanent.

    The file must be a valid small picture.

    The first of these warnings is a bit of a problem. How do you ensure that the file you specify is present in the design directory? You can put it there manually. Or you could provide a chain of events in some corner of some level that is unreachable. That chain of events could reference all the small pictures you might need for your GPDL programs.

    The second warning means that the text event that initiates your GPDL program must specify a small picture. It will not be seen if your program displays a different picture before doing any text input/output. But it must be there. $SMALL_PICTURE can only replace the file name in an existing small picture.

    The third warning means that when you execute a $SMALL_PICTURE function, it changes the event itself. The next time the event is initiated the new picture may be displayed or the old picture may be displayed, depending on whether the level has changed or the game saved. So any event that changes the picture should be careful to initialize itself to the first picture that should be displayed.

    Warnings having been heeded, here is how you change the picture:

             $SMALL_PICTURE(filename);

    There, that was not too hard. If you break any rules, either no picture will be displayed or the wrong picture will be displayed.