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,656
Reaction score
5,170
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

Dama wrote on akoniti's profile.
Hi
Thanks for your review.
I was checking the trailer for details and as the woman shut the door at the exact moment the song I was hearing said "you slim the door" and I couldn't resist to add it there. :D And I used this idea one more time on another scene.
Just doing some tileset tinkering again...
rux
Someone please help me make my game.
I need someone to volunteer, I am on my knees man.
I made my own pizza. First critique, more chicken next time.

Forum statistics

Threads
104,690
Messages
1,008,142
Members
136,181
Latest member
julrcz
Top