Looping Animations on Map

search Looping Animations in titles only, with me as the author:
https://forums.rpgmakerweb.com/index.php?threads/looping-animations.15624/
Damn it Shaz, Why didn't I know you were a javascript messiah? 😮
Nice work 🙂
For some reason no matter where I set the event ID the animation will just follow the player?
You need to provide way more information than that if you want assistance. Without it, I can only guess at what you might have done wrong.

The event id is a number, not text, and does not have leading zeros. By default event 15 will be called EV015 but its id is 15. So you would pass in 15 as the argument, not EV015 and not 015.

Is that what you are doing? If not, please provide a screenshot showing how you have called the plugin command and the parameters.

Also confirm that the event with that id still actually exists on the map.
Hi Shaz! Thanks for the prompt response. Here's a screenshot of how I'm calling the plugin command.
lLbseRD.png

Event #2 is still on the map. I uploaded a short video capture to youtube to show you what's happening.

So basically I want the smoke animation to just loop around the cigarette sprite but it's just following the player. I hope this helps.
Thanks again.
There doesn't seem to be anything wrong with the plugin call. Let's see if it's a plugin conflict ... what other plugins do you have? If you pop this into a brand new project with no other plugins, does it work? What version of core files are you using?
So I tried it in a new project and it worked fine. Here's a screenshot with the other plugins I'm using.
RPEDzze.jpg
okay, so the next step is to disable those plugins one by one, save, and play, and at some point it'll start working. This means the plugin you just disabled is the one that's conflicting. Just looking at the list, it could be any one of those, and I'm hesitant to say which ones might be more likely. Lucky you only have a very small number of them 🙂

It could also mean an incompatibility with the core files in your original project. I asked you what version they were, but you didn't answer that. If you created that project and then updated MV but didn't update the project, the new one you just created would have a different version of core files.

Alt+PrintScreen will let you capture the active window so we don't get the background. Makes it easier to read too.
Okay I figured it out! I tried disabling every plugin and it still didn't work, so it wasn't a plugin conflict. The core files are up-to-date so it shouldn't be those. The animation I was using was a custom one, which was Fog without the sound effects. The position of the animation was set to "Screen". When I switched the position to "Center", it worked great (without following the player)! So I guess if the animation is set to "Screen" it will follow the player no matter what? And that's why it worked in the new game, I used a different animation but it was set to "Center". Thanks again for your help Shaz.
Ah, of course. Yes. When you have an animation set to screen, it is centered on the screen - not the player. If you did an event that made the screen scroll while the player stayed still, I would expect the animation to move away from the player and stick with the screen.

Center, head and feet all make it focus on an object - usually a battler, but in this case an event.

Good find!
I'm not sure if you'll update this plugin, but I'd really like if animations would stop instantly on LoopAnimation stop, it seems it has to finish playing before it stops. I wanted to use this to have animated talking heads during dialogue. It'd even be useful to have an animated text box, I think.
I need to run the plugin commands via javascript, I looked at your code and tried to run it, but I couldn't.

This is the javascript I used:


JavaScript:
var eventId = $gameVariables.value(x);
var Event_Animation = new Game_Interpreter();
Event_Animation.pluginCommand('LOOPANIM', ['START', eventId, 190]);
I need to run the plugin commands via javascript, I looked at your code and tried to run it, but I couldn't.
This is the javascript I used:
That's not correct. Your game already has an interpreter, declaring a new one is not going to make it run any commands.

You also would not try to call the plugin command via script call, you would directly call the function that command activates.

The correct code should be:
Code:
$gameMap.event($gameVariables.value(x)).loopAnimStart(190);

Original thread: https://forums.rpgmakerweb.com/threads/looping-animations-on-map.46757/