Posts: 8
Threads: 2
Joined: Jul 2012
Hello,
I was wondering if it were possible to make the battle actors sprites move or "run" off the screen, when you successfully escape. By default, RPG Maker XP automatically fades the battle screen to the game map when escaping, but I figured out a way to make a help window appear saying that escaping was successful, so it doesn't fade until you press the action button. The problem is, I can't figure out a way to make the actor sprites run away. They just stand there which doesn't look right. I'm using the Animated Battlers - Enhanced script by Minkoff and DerVVulfman if that helps. Thanks in advanced.
Posts: 700
Threads: 125
Joined: Nov 2011
Scene_Battle 2 line 114 should be a good start, and then just create a loop inside it that changes the battler for each character to a frame of running away, as well as its X and Y
Posts: 8
Threads: 2
Joined: Jul 2012
Okay, I see where you are going with this. The problem is, how would I go about modifying the x and y location of a battler? The location where the system determines whether you escape or not is in Scene_Battle class, but the location of all the battler's coordinates are handled in the Sprite_Battler class. This is probably something that's easy to do for an experienced scripter, but I'm still pretty new at scripting. I kinda understand how it works, but not fully. Is there a way to make the Scene_Battle class also handle the locations of the battlers? Sorry if I'm not making any sense...
Posts: 700
Threads: 125
Joined: Nov 2011
No it's okay, I'd think that it would still allow for you to add a layer and write bitmaps of people, and then adjust, cause there's a spot there for the chime to sound, so you might be able to start adding a loop inside there, but I am NOT a scripter of that quality, but... luckily there are plenty of them here.
(07-24-2012, 06:06 AM)NewHope Wrote: Okay, I see where you are going with this. The problem is, how would I go about modifying the x and y location of a battler? The location where the system determines whether you escape or not is in Scene_Battle class, but the location of all the battler's coordinates are handled in the Sprite_Battler class. This is probably something that's easy to do for an experienced scripter, but I'm still pretty new at scripting. I kinda understand how it works, but not fully. Is there a way to make the Scene_Battle class also handle the locations of the battlers? Sorry if I'm not making any sense...
Posts: 8
Threads: 2
Joined: Jul 2012
(07-24-2012, 06:18 AM)DaVoice Wrote: No it's okay, I'd think that it would still allow for you to add a layer and write bitmaps of people, and then adjust, cause there's a spot there for the chime to sound, so you might be able to start adding a loop inside there, but I am NOT a scripter of that quality, but... luckily there are plenty of them here. You may be right, but yeah, I'm not the best scripter out there either. Hopefully, I can get someone experienced to help me out. Thanks anyway. :)
Posts: 400
Threads: 13
Joined: Mar 2010
I've tried this before and never managed to achieve it. What -may- be happening is that the battle moves on to the ending processes before the battlers can take a step, this cutting it off.
There is a definition in Animating Battlers that can do all the moving and animating for you - I know it works for the rest of my customisations, but... yeah. Here it doesn't. The definition is setmove, here's an example of it actually for running away. Seems I still have it in my game, but it never happens.
PHP Code: <?php
# Remove actor
for actor in $game_party.actors
@spriteset.battler(actor).setmove(actor.screen_x + 250, actor.screen_y, actor.screen_z)
end
Posts: 8
Threads: 2
Joined: Jul 2012
(07-25-2012, 02:57 AM)Taylor Wrote: I've tried this before and never managed to achieve it. What -may- be happening is that the battle moves on to the ending processes before the battlers can take a step, this cutting it off.
There is a definition in Animating Battlers that can do all the moving and animating for you - I know it works for the rest of my customisations, but... yeah. Here it doesn't. The definition is setmove, here's an example of it actually for running away. Seems I still have it in my game, but it never happens.
PHP Code: <?php
# Remove actor
for actor in $game_party.actors
@spriteset.battler(actor).setmove(actor.screen_x + 250, actor.screen_y, actor.screen_z)
end
Oh my...! I figured it out! :D
I replaced actor with battler, like so:
PHP Code: <?php
for battler in $game_party.actors
@spriteset.battler(battler).setmove(battler.screen_x + 500, battler.screen_y - 1, battler.screen_z + 10)
end
And I placed it in that Scene_Battle class where the system determines whether the escape is successful, and it worked! Thank you so much for the setmove code. That helped me finally figure out the problem!
Posts: 400
Threads: 13
Joined: Mar 2010
...
DAMMIT, OF COURSE. For whatever reason, if the current y and target y are the same, the character won't move. This could even affect running up to an enemy if by chance they lined up, which is how I know of that issue, D|
Posts: 8
Threads: 2
Joined: Jul 2012
(07-27-2012, 06:09 AM)Taylor Wrote: ...
DAMMIT, OF COURSE. For whatever reason, if the current y and target y are the same, the character won't move. This could even affect running up to an enemy if by chance they lined up, which is how I know of that issue, D| lol yeah, it's so weird why that happens... Oh well, at least the problem has been solved! xP
|