A way to call multiple actions in one script?

Hello! Okay, so I want to know if it's possible to 'shortcut' event commands. I want to call multiple animations on a bunch of squares, but I don't want to have to individually put every single one down every single map.


So, is there a way to like do event script calls where I can put in multiple entries? Like 1-5 by going... script call animation code thing here (1,2,3,4,5) or (1 to 5). I have no idea, but I thought I'd try. Thank you to anyone who helps.
no, but that is what common events are intended for.
you place the sequence that is to be repeated in a common event and then call that common event in the map event.
no, but that is what common events are intended for.
you place the sequence that is to be repeated in a common event and then call that common event in the map event.

The event numbers change every map so a call common event won't work. But thank you for the suggestion and clearing up that it's not possible.
The event numbers change every map so a call common event won't work. But thank you for the suggestion and clearing up that it's not possible.
It is.

JavaScript:
$gameTemp.requestAnimation([$gameMap.event(1), $gameMap.event(2), $gameMap.event(3), $gameMap.event(4), $gameMap.event(5)], animationId);

Where animationId is the ID of the animation you want to play.
It is.

JavaScript:
$gameTemp.requestAnimation([$gameMap.event(1), $gameMap.event(2), $gameMap.event(3), $gameMap.event(4), $gameMap.event(5)], animationId);

Where animationId is the ID of the animation you want to play.

I can't thank you enough for this, thank you! ♥ You've saved me years of my life, lol.
I can't thank you enough for this, thank you! ♥ You've saved me years of my life, lol.
If you want to be a bit fancier about it, there's an even shorter method.

JavaScript:
$gameTemp.requestAnimation([1, 2, 3, 4, 5].map(id => $gameMap.event(id)), animationId)

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/a-way-to-call-multiple-actions-in-one-script.152214/