Re doing the battle system questions

Started by Ryex, May 19, 2009, 09:23:47 pm

Previous topic - Next topic

Blizzard

June 01, 2009, 03:19:14 am #20 Last Edit: June 01, 2009, 03:20:33 am by Blizzard
You can change the zoom_x and zoom_y attributes of a sprite rather that using stretch_blt.

If you want to change bitmaps on actions, you should implement it in Scene#update_phase4_step3 (animation for action performer) and Scene_Battle#phase4_step4 (animation for action targer) as those are the moment where the database animations are being played. @active_battler is the current battler instance.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

zoom_x and zoom_y... *slaps head*

Quote from: Blizzard on June 01, 2009, 03:19:14 am
If you want to change bitmaps on actions, you should implement it in Scene#update_phase4_step3 (animation for action performer) and Scene_Battle#phase4_step4 (animation for action targer) as those are the moment where the database animations are being played. @active_battler is the current battler instance.


but those methods only pass information to a Game_Actor/Game_Enemy class instance, when Spriteset_Battle is updated it updates Sprite_Battler instances which handle the animation based on information it pulls from the Game_Actor/Game_Enemy class instance stored in @battler. so yes I would need to use those methods but the methods for the animation would have to go in Sprite_Battler, right?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

You need two parts of code. One for setting it up in the scene (i.e. @active_battler.run_animation = true) and another part in Sprite_Battler#update where you check if there is a request for an animation (by checking @active_battler.run_animation or something like that) and execute it.

Sprite_Battler and Sprite_Character classes use a concept of observation. They observe the data classes and display information in form of sprites.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Ryex

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

fugibo

I'm not sure what you mean, but I think you're trying to ask "How do I get the battleback to scroll," like the way you scroll a webpage. You just change the x and y of the sprite (assuming you loaded the full bitmap or whatever you needed to do) by whatever increment you need. Some of the classes (can't remember which, I think it's just Bitmap) also have @ox and @oy, but I haven't really used those so I don't know if they'd help.

Alternatively, just look at how Fogs are implemented in the RTP.

G_G


fugibo

Yeah, but those aren't interesting. Fogs = Fancy Graphics.

Ryex

aw found what I needed, the Plane class, changing the ox and oy of a plane class will scroll it.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />