Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Showing Picture of Item
revolverwinds
post Feb 14 2012, 08:05 PM
Post #1


Level 2
Group Icon

Group: Member
Posts: 28
Type: Artist
RM Skill: Intermediate




happy.gif ,

I've been trying to create a feature where an item, upon being clicked on from the menu, shows an illustrated picture of that item which stops other events and can then be exited upon pressing a button. Anyone have an event system they can share that functions similarly? Thank you in advance.
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 15 2012, 01:46 AM
Post #2


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




I feel this is impossible by event processing. You need a script, since when you click an item, events can't run.
If nobody answer your question, I can do it, but you'll have to wait four to five days (the script isn't actually difficult, but I have some problem ATM).

Jens


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
revolverwinds
post Feb 15 2012, 08:41 AM
Post #3


Level 2
Group Icon

Group: Member
Posts: 28
Type: Artist
RM Skill: Intermediate




That would be excellent, and I'd be in your debt. I've already all the pictures ready at hand. I only wish I could figure out how to bypass this issue. Thank you again. laugh.gif
Go to the top of the page
 
+Quote Post
   
Sakura Phoenix
post Feb 15 2012, 08:45 AM
Post #4


Cherry Blossom of the Heart
Group Icon

Group: Revolutionary
Posts: 447
Type: Artist
RM Skill: Skilled




I suppose it'd be good to ask if you are using any scripts outside the default? Like any item detail scripts or which menu command script you might use/be using.


__________________________
My Projects:


Projects I support
Looking for some new sci-fi projects to support~
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Feb 15 2012, 12:40 PM
Post #5


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




QUOTE (Sakura Phoenix @ Feb 15 2012, 05:45 PM) *
I suppose it'd be good to ask if you are using any scripts outside the default? Like any item detail scripts or which menu command script you might use/be using.


@revolverwinds

Right. And yes, I have to know the approximate size of the pictures... 640 x 480? 320 x 240? Or variable size?
Well, I'll give it a shot, then, using the more aliases I can in order to make it compatible with almost everything...
I'll trigger it with Z key, it's okay?

EDIT: No way, I've just scripted something which should work.

CODE
#==============================================================================
#=#============================================================================
# #** Jens of Zanicuud item picture script v 1.0
# #   -free use, just credit
# #   -free customization, however, posting on RRR the modified version is
# #    mandatory
# #   -you can find me on www.rpgrevolution.com
#=#============================================================================
#==============================================================================

#==============================================================================
# ** How to use
#==============================================================================
# Just put into Pictures folder pictures with the same name of the item they
# are related to. In Item scene, just press Z key in order to show the picture
# Ask for troubleshooting anytime.
#==============================================================================
# ** Scene Item
#==============================================================================
class Scene_Item
  
#==============================================================================
# * Aliases
#==============================================================================
  alias joz3_picture_item_main        main
  alias joz3_picture_item_update      update
  alias joz3_picture_item_update_item update_item

#==============================================================================
# ** Main
#==============================================================================
  def main
    #create sprite
    @item_sprite   = RPG::Sprite.new
    @item_sprite.z = 9999
    @item_sprite.x = 320
    @item_sprite.y = 240
    @item_view     = false
    #standard main
    joz3_picture_item_main
    #dispose sprite
    if @item_sprite.bitmap != nil
    @item_sprite.bitmap.dispose
    end
    @item_sprite.dispose
  end

#==============================================================================
# ** Update
#==============================================================================
  def update
    #new update
    if @item_view
      update_picture
      return
    end
    #standard update
    joz3_picture_item_update
  end

#==============================================================================
# ** Update Item
#==============================================================================
  def update_item
    joz3_picture_item_update_item
    #when Z key is pressed
    if Input.trigger?(Input::A)
       @item                = @item_window.item
      #check the existence of the picture file
      if FileTest.exist?("Graphics/Pictures/"+ @item.name + ".png")
       $game_system.se_play($data_system.decision_se)
       @item_view           = true
       @item_window.active  = false
       #picture should share the same name as the item
       @item_sprite.bitmap  = RPG::Cache.picture(@item.name)
       @item_sprite.ox      = @item_sprite.bitmap.width/2
       @item_sprite.oy      = @item_sprite.bitmap.height/2
       @item_sprite.visible = true
       return
      else
       #if file doesn't exist, return a buzzer
       $game_system.se_play($data_system.buzzer_se)
      return
      end
    end
  end

#==============================================================================
# ** Update Picture
#==============================================================================
  def update_picture
    #if Enter, C, Esc, X, Del or Z are pressed
   if Input.trigger?(Input::A) or
      Input.trigger?(Input::B) or
      Input.trigger?(Input::C)
      #return back to item selection
      $game_system.se_play($data_system.cancel_se)
      @item_sprite.visible = false
      @item_view           = false
      @item_window.active  = true
      return
    end
  end
  
  end #Scene item class end


Instructions are in the first few lines of the script itself.

Ask for troubleshooting anytime smile.gif

Jens

This post has been edited by Jens of Zanicuud: Feb 15 2012, 01:13 PM


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
revolverwinds
post Feb 16 2012, 05:57 PM
Post #6


Level 2
Group Icon

Group: Member
Posts: 28
Type: Artist
RM Skill: Intermediate




Thank you greatly laugh.gif . I was planning ahead, so it'll be a few days until I've completely tested it. I'll be sure to report on its success here once I've tried it.
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 24th May 2013 - 07:19 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker