Did you copy paste the plugin code or right-click save as? You could have made an error copy pasting.
Simple enemy idle animation?
RPG Maker MZ SupportI copy pasted as it was the only option Firefox lets me do for some reason.... I'll try again tomorrow to "save as" on a different browser
Now that I think of it me making an error copy pasting would make a lot of sense considering the type of error it was...
I'll let this thread know tomorrow as I'm logging off for the night 😉
Thanks for being patient and helping.
Ok so now my game works (thanks for the suggestion of "save as"), so that's good, but when I get into a battle it has SOOO MUCH LAG! like- half a frame per second... How do I fix that???
I know it's because the parallel event but I'm not really sure how to make it work lol
Edit:
I found how to make it work,
I can't use the code string:
BattleManager._spriteset._enemySprites[X].bitmap = ImageManager.loadEnemy("sv_enemy_name")
As that causes the game to freeze, instead I found using "enemy transform" works, so my event string is:
Label : 1
Enemy transform : #1, (enemy 1)
Wait : 20 frames
Enemy transform : #1, (enemy 2)
Wait : 20 frames
Enemy transform : #1, (enemy 3)
Wait : 20 frames
Jump to Label : 1
I'll have to make a common event per enemy, but it works!
If you have a way of getting the code to work though that would probably be more ideal as the name of my monster has a random letter after its name now.. (๑•﹏•)
I know it's because the parallel event but I'm not really sure how to make it work lol
Edit:
I found how to make it work,
I can't use the code string:
BattleManager._spriteset._enemySprites[X].bitmap = ImageManager.loadEnemy("sv_enemy_name")
As that causes the game to freeze, instead I found using "enemy transform" works, so my event string is:
Label : 1
Enemy transform : #1, (enemy 1)
Wait : 20 frames
Enemy transform : #1, (enemy 2)
Wait : 20 frames
Enemy transform : #1, (enemy 3)
Wait : 20 frames
Jump to Label : 1
I'll have to make a common event per enemy, but it works!
If you have a way of getting the code to work though that would probably be more ideal as the name of my monster has a random letter after its name now.. (๑•﹏•)
Seems to work fine for me with 20 frame wait times.
You don't need that 'jump to label' as it's a parallel common event. Did you set in the plugin settings that only selected common events run (in case you have others running)?
Otherwise show screenshots and maybe someone can help you.
You don't need that 'jump to label' as it's a parallel common event. Did you set in the plugin settings that only selected common events run (in case you have others running)?
Otherwise show screenshots and maybe someone can help you.
For what it's worth, my Battler Flipbooks Core does animate with loose frame images rather than spritesheets. It's also quite slim at runtime, despite the amount of text in the file. Most of that is related to setting up the animations by mouse in the plugin parameters.
(I've since updated it to be officially cross-version, though I think it actually just worked in MZ too from the get-go. Yay for doing only one thing (and careful use of transparent hooks)
)
Note that it's a plugin framework that needs to be instantiated by a "Layer" to actually do anything.
I do charge for the ready-made ones, but it's an open system (I guarantee API stability for all my plugins) and there's an example layer under CC0 here: Battler_Flipbooks_LAYER.js#L758-L774 (GitHub/Tamschi)
The example layer has everything that's needed in terms of boilerplate and parameter definitions, but only triggers each time the battler takes ("performs", it's subtly different) damage. The link should highlight the part of the file that needs to be adjusted. In your case, I'd replace it with the following code (taken from my Battler Entrance Flipbooks):
By setting a very high repeat limit, the looping section of the "Flipbook" effectively becomes an idle animation.
(I've since updated it to be officially cross-version, though I think it actually just worked in MZ too from the get-go. Yay for doing only one thing (and careful use of transparent hooks)
)Note that it's a plugin framework that needs to be instantiated by a "Layer" to actually do anything.
I do charge for the ready-made ones, but it's an open system (I guarantee API stability for all my plugins) and there's an example layer under CC0 here: Battler_Flipbooks_LAYER.js#L758-L774 (GitHub/Tamschi)
The example layer has everything that's needed in terms of boilerplate and parameter definitions, but only triggers each time the battler takes ("performs", it's subtly different) damage. The link should highlight the part of the file that needs to be adjusted. In your case, I'd replace it with the following code (taken from my Battler Entrance Flipbooks):
JavaScript:
...core.makeHook(() => api, BattleManager, function setup() {
const result = api.oldSetup.apply(this, arguments);
for (const battler of BattleManager.allBattleMembers()) {
runtime.applyRules(battler, {});
}
return result;
}),
By setting a very high repeat limit, the looping section of the "Flipbook" effectively becomes an idle animation.
Original thread: https://forums.rpgmakerweb.com/threads/simple-enemy-idle-animation.181460/