Looping Animations on Map

● ARCHIVED · READ-ONLY
Started by Shaz 20 posts View original ↗
  1. Looping Animations

    2015.10.21

    by Shaz

    Introduction

    This plugin allows you to loop animations on map events.

    It also allows you to tell an animation (either looping animation, from this plugin, or a normal animation from the Show Animation event command) to play behind the character sprite instead of in front

    How to use

    Add to your plugins folder (file name does not really matter, but I call mine LoopAnim.js).  There are no plugin parameters to configure.

    Use the plugin command LoopAnim start event animid to start a looping animation on an event.

    Use the plugin command LoopAnimation stop event to stop an animation from looping on an event.

    Use the plugin command SetAnimLoc event location to make an animation play behind or in front of an event

    animid is the animation id from the Animations tab.  Do not enter leading zeros.

    event can be a number (no leading zeros) for a specific map event, 0 for the event that has the plugin command, -1 for the player.  You can also use $gameVariables.value(x) to tell it to retrieve the event id from variable x (change x to the variable id).

    location can be any of below/behind/above/front.

    Plugin

    Download from pastebin

    Credit

    - Shaz

    Terms

    - free for use in commercial games

    Revisions

    Spoiler
    2015.10.30 - added ability to make animations play behind the character instead of in front
  2. Thank you for this.

    Is it possible to make the Battle Animation appear below the Actor and other events instead of it being on top?
  3. I will have a look at that - I had assumed the animations would play on the event according to where the Animations tab says to play them (you have a sprite when creating an animation and can say whether it plays near the head or feet or wherever).
  4. Shaz said:
    I will have a look at that - I had assumed the animations would play on the event according to where the Animations tab says to play them (you have a sprite when creating an animation and can say whether it plays near the head or feet or wherever).
    Oh, I meant the Battle Animation playing behind the Actor Sprite on the map, Z-axis positioning wise. So the Actor could be walking on top of the battle animation.

    I'm not sure if in RPG Maker that battle animations have always been played over the event's sprite.
  5. I have updated this plugin to allow you to make an animation play BELOW/BEHIND the character on the map.  This can be used either for the looping animation OR for a regular Show Animation command.

    To use, add a Call Plugin command as follows:

    SetAnimLoc event locationwhere event is the event id (0 for "this event", -1 for player, or 3 for EV003, etc), and location is one of behind/below/above/front.  Animations play above/in front of the character by default.

    This plugin call should be used before the LoopAnim plugin call if you are using them together.  However you can issue the SetAnimLoc plugin call after starting the looping animation, and it will change its z-index when the next iteration begins.
  6. Hm. I thought it could be achieved by just setting a loop with the animation command inside, but this could very well have a different effect x3
    I may try it out if I think of a use for it. Nice job anyway~
  7. A loop with animation inside would require you to get your timing just right so you could start it again when it finished, without a break between.  It would also require more processing, so could affect your game's performance.  Still - give it a go if you want to - I'm a big fan of not using scripts/plugins when you don't have to :)
  8. Thank you so much, Shaz, for the ability to set the animation below the player! I'm also really surprised at the lack of lags for even playing multiple animations.

    It really helps me to save the time and memory resource from remaking a sprite of the battle animation with many frames of animations with transparency as an event to be animated below the character.

    What's the difference between the location of BELOW and BEHIND? I've tested both and didn't notice any difference. Is it for convenience because some people would incline to type BEHIND and vice versa?
  9. They both do the same thing.  I just included both options in case people got confused :)
  10. I get a syntax error, no Idea why  EDIT: LOL I just had it in the scripts part lolololo sorry

  11. Those errors don't appear to have anything to do with this plugin.
  12. I know, But I meant they only came when it was Running the script event calls(even though they were meant to be plugin commands, hense how It was fixed and just a dumb mistake XD)
  13. First of all, I want to say that I love this plugin because it fixes the bug in default MV where entering the menu makes animations disappear.

    One question, though. Is there a way to have animations play beneath the tileset, but above the parallax layer? I want to have a rain effect outside a window.
  14. Can you show me a screenshot of your map, zoomed in as large as possible, so I can see where you plan to show it? I'm imagining you have a patch of grass or some tree trunks on the lower layer (A tiles) with a window from a B-E tile above it?
  15. vRZQUtt.png

    Green and Blue with clouds: Parallax (bottom layer)

    Dark gray: Wall with transparent window (A tiles)

    Light gray: Floor (A tiles)

    Yellow lines: Rain animation

    Red square: Character

    I don't have a screen because this is only a concept right now, but I know how to execute it because of Galenmereth's Bind Picture to Map, which has all the layers you would need for this, but doesn't allow drawing animations.
  16. I'm glad to see you remade your looping animation script for MV!

    I've used the Ace version and loved it! I hope to try this out later.
  17. Shaz said:
    Can you show me a screenshot of your map, zoomed in as large as possible, so I can see where you plan to show it? I'm imagining you have a patch of grass or some tree trunks on the lower layer (A tiles) with a window from a B-E tile above it?



    I don't mean to bother you, but was my image not detailed enough? I'm willing to provide a more detailed mockup if so.
  18. I'm really sorry - I didn't get notification that you had replied.


    I'm testing something out, and it's partially working - animations AFTER the first loop will play behind the map and in front of the parallax.  But it needs some tweaking to play in between.


    Usually if I want to do something like this (seeing rain through a window), I would create a character sprite for it with the different frames, and either turn on stepping animation or set the autonomous move route to 'turn down, turn left, turn right, turn up' and repeat.  Something like that will work if you only need 3 or 4 frames of animation.  That would save you having to wait for a mod to this plugin.
  19. Shaz said:
    I'm really sorry - I didn't get notification that you had replied.


    I'm testing something out, and it's partially working - animations AFTER the first loop will play behind the map and in front of the parallax.  But it needs some tweaking to play in between.


    Usually if I want to do something like this (seeing rain through a window), I would create a character sprite for it with the different frames, and either turn on stepping animation or set the autonomous move route to 'turn down, turn left, turn right, turn up' and repeat.  Something like that will work if you only need 3 or 4 frames of animation.  That would save you having to wait for a mod to this plugin.



    Don't worry about it. Thanks for taking the time to look into this. I'll wait as long as it takes, and if I get to the part I want to use this for before that, then I'll just make an animated tile for it or use the step animation method.


    Not sure if this helps, but this plugin:





    allows you to play animations behind the map and above the parallax. The only problem is that it doesn't fix the default MV bug where all animations disappear when you enter and exit the menu.
  20. Is there a version of this for VX Ace? I'm having a problem in my VX Ace game where the animation moves with the camera.