Stencylpedia - Image API

2DIndie

  • Posts: 51
I can't find :-\ in stencyl 4.0.3:
Quote
Use the menu item: Debug > View > View Folder for this Game to reveal your game's folder.

Edit:
Now i think i've found it :-[ in welcome center.

------------------------------------------------------

Next question:
Quote
Use the image from file block to load them into images.
What does this mean? ::)
If i translate in my language it's like "to load this in images", but what does it mean? Where?

« Last Edit: September 19, 2020, 01:24:34 am by 2DIndie »

squeeb

  • Posts: 1617
You can save an image file in a folder called "extras"    myimage.png

You'll have to create the folder and name it extras if there isn't one in the game folder for the stencyl game you're working on

Then use that block to get that image you saved on your pc in that exrras folder.... myimage.png

There are some examples here somewhere in the forums


Luyren

  • *
  • Posts: 2802
You load your external image into an image attribute when you use the block. The article should have an example of its usage.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

2DIndie

  • Posts: 51
Thanks!  :)

So if i understand right i've to use this block for each image in this "extras" folder so that each image get a image attribute?
Ok. ;)

The article doesn't helped me, so i asked here. ;)

2DIndie

  • Posts: 51
Am i right? ???
It would be nice to get an answer as well. ;)

Luyren

  • *
  • Posts: 2802
You create an image attribute, set it to your external image, and create an image instance attribute to display that.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

supremelorax

  • Posts: 41
Here is a look at a simple arrangement that will make an image visible.

First set the image attribute to the file you put in the extras folder.
Then when you are ready to show the image you will need to set an instance of it to an attribute. You can then attach that instance, fade it, anything else Stencyl allows you to do. To remove it there is also a block for that.

image API rocks

supremelorax

  • Posts: 41
Also: folder is in Tools>Workspace>Show Folder for this Game