The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: &&&&&&&&&&&&& on January 10, 2007, 07:33:51 PM

Title: Would this do anything?
Post by: &&&&&&&&&&&&& on January 10, 2007, 07:33:51 PM
Ok, im at school so I cant check if this works so, would this code do anything, and is there something I can change to make it work?

Code: [Select]
class pic 
   def say
   print @greeting + " " + @name   
   image = Sprite.new
    image.bitmap = RPG::Cache.picture(name of picture)
   end

end

Oh, and I wrote it...  :lol:
Title: Re: Would this do anything?
Post by: Blizzard on January 11, 2007, 10:24:09 AM
It should work, but you would first need to load an instance of the class somewhere

Code: [Select]
picture = pic.new

and define the variables @greeting and @name.