View Full Version : Drawing an Image

October 25th, 2011, 4: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.

October 25th, 2011, 6:49 AM
Try useing
$picture.bitmap=RPG::Cache.picture("insert graphic name here")

October 25th, 2011, 7: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!

October 25th, 2011, 7: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