The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Kyle? on February 09, 2010, 09:01:44 AM

Title: [RESOLVED] Use Sprites Insted Of Faces
Post by: Kyle? on February 09, 2010, 09:01:44 AM
Sprites In Menu
AUS: 9/2/2010 USA: 2/9/2010




Summary
Well I Want The Sprites To Be Shown In The Menu Screen Insted Of Face Sprites

Features Desired

Games its been in



Did you search?
Yes

Where did you search?

What did you search for?
Title: Re: Use Sprites Insted Of Faces
Post by: modern algebra on February 09, 2010, 12:08:08 PM
I could probably do this. I take it you just want the sprites to be drawn, not animated or anything? And you want the rest of the scene to be the same, so not like this: http://rmrk.net/index.php/topic,35085.0.html
Title: Re: Use Sprites Insted Of Faces
Post by: Kyle? on February 10, 2010, 05:25:39 AM
No I Don't Wantg It Like That
Just The Normal Menu With Sprites Face Left
Insted Of Faces
But I Know I Put It Up The Top
But Can You Not Inclued The Status Screen
Just Veiwing Them When You Open The Menu
Title: Re: Use Sprites Insted Of Faces
Post by: modern algebra on February 10, 2010, 07:31:55 PM
Alright, I wrote this quick:


#==============================================================================
#    Sprites Instead of Faces
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: February 10, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#   This script allows you to replace the face graphic of an actor with his
#  sprite in specified scenes.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place this script in its own slot in the Script Editor (F11) below the
#   default scripts but still above Main.
#    To change exactly where the sprite is positioned, you can alter the
#   SIF_SPRITE_Y_OFFSET value at line 22. To have this feature in additional
#   scenes, just add the class name of the scene to the array in
#   SIF_INCLUDED_SCENES at line 23.
#==============================================================================

SIF_SPRITE_Y_OFFSET = -32 # Any integer. Lesser values are higher on the window
SIF_INCLUDED_SCENES = [Scene_Menu] # [scene1, scene2, ..., sceneN]

#==============================================================================
# ** Window_Base
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - draw_actor_face
#==============================================================================

class Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Actor Face Graphic
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     size  : Display size
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malg_drwactrface_spritereplce_6uj2 draw_actor_face
  def draw_actor_face(actor, x, y, size = 96, *args)
    if SIF_INCLUDED_SCENES.include? ($scene.class)
      draw_actor_graphic (actor, x + (size / 2), y + size + SIF_SPRITE_Y_OFFSET)
    else
      malg_drwactrface_spritereplce_6uj2 (actor, x, y, size, *args)
    end
  end
end



Though, reading your last post, I see you want it to show them facing left? That's kind of weird; are you sure?
Title: Re: Use Sprites Insted Of Faces
Post by: modern algebra on February 20, 2010, 01:49:40 AM
Well, you sort of disappeared. If you still want the implementation where the sprite can be shown facing left, it is possible with the new script I wrote here (http://rmrk.net/index.php/topic,37557.0.html).