Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Animated Battlers -> Status Screen

Status
Not open for further replies.
Can someone give me a little script on the basic outline of having animated battlers drawn. I can do the alignment and all that. I can't make a script from scratch, but I just need something to do this.
Thanks!

Details: Using SDK 2.3. M.A.C.L. 1.5.
I have Mog Styled menu with Status from that and I need to have my animated battler there instead of the one they had or default battlers. This is a problem, because I have Minkoff.
I thank anyone who tries or helps me in doing this!
 
To add animated images to a window is a little annoying but can be done.  I would look Sprite_Character, def update, as it displays the character and when walking sets the walking state.  This is all figured according to the @pattern value figured in Game_Battler which is the super class of events and actors. 

Here is a little code snippet from Sprite_Character...
Code:
self.bitmap = RPG::Cache.character(@battler.character_name,   
          @battler.character_hue)   #This sets the bitmap equal to the character_name assigned
        @cw = bitmap.width / 4 #this sets the width of the CROP for the image
        @ch = bitmap.height / 4  #this sets the height of the CROP for the image
        self.ox = @cw / 2
        self.oy = @ch

.
.
.
.
sx = @battler.pattern * @cw #sets the starting position for the X crop 
sy = (@battler.direction - 2) / 2 * @ch #sets the starting positions for the Y crop
.
.
self.src_rect.set(sx, sy, @cw, @ch) #sets the bitmap to only display the cropped section of the image.

Then in Game_Battler the update should increment @pattern automatically for you.  This means that the image will cycle through the images left to right accordingly. 

Before you start adding battlers to windows, I would recommend to look at this script I made that allows you to run common events in the menu.. and adjust it to work for displaying the battlers for you.  (link

To add battlers to the menu.. you will need to do it from the scene setup...
Code:
for actor in $game_party.actors
  actor.z = 5000 #this brings them to the FRONT of whatever is above them.
  @spriteset.character_sprites.push(Sprite_Character.new(@spriteset.viewport, actor)
end
or something like that.  Good luck with your project, and I hope this helped.
 
Thanks, I will try to figure this out. Though I might just insert a blank image so that it will turn off battlers using name_fc2. Only works with this script though, but thanks for your time. I remember seeing a script that did this, but ever since rmxp crashed I can't find it.

Note: I reported this to mod, so someone please close this topic. Thanks for the help.
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top