How do I play an animation using Javascript?

Status
Not open for further replies.

TheUnproPro

Veteran
Veteran
Joined
Oct 21, 2013
Messages
17
Reaction score
24
First Language
English
Primarily Uses
[EDIT]
This is finally solved. I'll be posting a tutorial as soon as I can get some non-jank code up n' running!

Hello, I've been trying to figure this out for a couple days now but I keep getting confused and thrown in a loop. Since the API documentation isn't complete, I have no way of figuring out how this works without intense critical thinking.

I need to play an animation at specified x/y coords. However, the animation sequence seems to be tied to actors. When I try to create an event actor, player actor or otherwise Sprite_Character manually, the animation -does- technically play but only the audio part of it. Likewise, if I create $gamePlayer inside a new scene, the animations sound will play but will not show. However, if I move the code below to Scene_Map, the animation plays just fine, but only if its on the player and not a custom actor?

$gameTemp.requestAnimation([target], animation_id, flip);

^ This is the code that tells the targets (actors) to play the animation, however I cannot get them to play whatsoever; I can only get them to play if target is equal to an already-existing map event or player. Please, for the love of all holy, can someone explain how this works and why it was decided to be set up this way?
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,867
Reaction score
5,240
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Learning Javascript. Please be sure to post your threads in the correct forum next time. Thank you.


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.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,047
Messages
1,018,539
Members
137,834
Latest member
EverNoir
Top