PDA

View Full Version : Drawing an Image


Bleack
October 25th, 2011, 04:53 AM
I'm trying to draw an image on the screen when the player uses an item in Poccil's Starter Kit. I created an ItemHandler for the item, but that's pretty much all what I've got so far. I've tried some snippets and tutorial found on the internet and looked trough the RGSS Reference manual but couldn't really figure it out.

PinkCatDragon
October 25th, 2011, 06:49 AM
Try useing
$picture=Sprite.new
$picture.x=100
$picture.y=100
$picture.z=99999999
$picture.bitmap=RPG::Cache.picture("insert graphic name here")

Bleack
October 25th, 2011, 07:13 AM
Wow, this is just a little embarrassing. The first hit on google contained a similar snippet:

@image = Sprite.new
@imate.bitmap = RPG::Cache.picture("name of picture")

And explicitly told me there should be a @ in front of the variable. But that resulted in an error , so I didn't bother to look any further. But it was so close! I really should look into the syntax :)

Thanks for the help dragonnite!

PinkCatDragon
October 25th, 2011, 07:19 AM
a @ makes it to the event page only but $ is global and is used anywhere
oh to get rid of picture use $picture.Dispose