Stencyl 3.4.0 is now out. Get it now!

Showing an image?

Beckb

  • Posts: 14
I'd like to get an image to display at a specific position on the screen when a boolean is turned on.
I see a lot of commands from the "Image" tab on the palette, but I do not know which one to use.
Many thanks in advance!

« Last Edit: October 09, 2017, 01:16:17 pm by Beckb »

merrak

  • *
  • Posts: 1643
The two attributes you need to be familiar with are "image" and "image instance". You can think of an image like an actor type and an image instance like an actor.

To create an actor you first have to create an actor type, then load an instance of that actor. Likewise, you'll need to load your image data into an image attribute first. Next, create an instance of that image and attach it to the layer, screen, or wherever you need it.

You can turn the image off by removing the instance and back on again by re-attaching it.