Draw Character Sprite [SOLVED

Discussion in 'Learning Ruby and RGSSx' started by IneptAttoney_08, Jul 2, 2019.

Thread Status:
Not open for further replies.
  1. IneptAttoney_08

    IneptAttoney_08 MMORPG! Veteran

    Messages:
    70
    Likes Received:
    10
    Location:
    Here!
    First Language:
    Indonesia
    Primarily Uses:
    RMVXA
    Hello!
    I want to know how to display character sprite in the window. I want to display sprites based on file names. for example I want to display the "Giant" sprite. and "Giant" already exists on Graphic / Characters. can anyone help me solve this case?

    I want to make a window like this:
    [​IMG]
     

    Attached Files:

    #1
  2. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,476
    Likes Received:
    2,869
    Location:
    Philippines
    First Language:
    Tagalog
    If its for Ace/RGSS3

    One way to do it is to make your own sprite object, then make a new bitmap object in it and draw the graphic on that new bitmap object.

    Code:
    spr=Sprite.new
    spr.bitmap = Bitmap.new(544,416)
    spr.bitmap.blt(parameters here)
    
    Look at the Bitmap entry on the help file for details on the parameters

    You can also opt to make a sprite object, create a bitmap object for the graphic then use that as the bitmap of the sprite object

    Code:
    spr = Sprite.new
    spr.bitmap = Cache.whateverfolderitis(filename)
    
    Look at the Cache entry of the help file for details on how to use the Cache, or read the Cache script on the script editor

    Create a window object from Window_Base and draw the graphics on its @contents bitmap object.

    Code:
    window = Window_Base.new(params)
    window.contents.blt(params)
    
     
    #2
  3. IneptAttoney_08

    IneptAttoney_08 MMORPG! Veteran

    Messages:
    70
    Likes Received:
    10
    Location:
    Here!
    First Language:
    Indonesia
    Primarily Uses:
    RMVXA
    may I ask 1 basic question? maybe this is out of topic, but this is related to the script that I am making now.

    the scripts that I created need a sprite window and draw gold, exp, and drop items from enemy.
    I don't know how to draw gold, exp and drop items from enemy.
    I will draw gold, exp and drop the enemy with the specified ID (Only 1 enemy)

    I have understood the way above! Thank you for your help!

    PS: I want to display the drop items from the enemy, but I use YEA-Extra Drop on my project. is it possible to draw the drop?
     
    #3
  4. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,476
    Likes Received:
    2,869
    Location:
    Philippines
    First Language:
    Tagalog
    You can check how the Window_Gold draws the gold value, how the Window_Status draws the character exp, levels etc.

    As for the drops, that should be doable but complexity depends if Yanfly's extra drop script provided an easy way to get the extra drops.
     
    #4
  5. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,445
    Likes Received:
    4,092
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #5
Thread Status:
Not open for further replies.

Share This Page