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,644
Reaction score
5,165
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

Enter the password in letters. (English subtitles)
I really tried to pull off something for halloween, but I don't feel like going on. I feel like the plot I was building was too generic, and I couldn't connect to it as I do with other projects. On the bright side, I've been working on my cosmic-puzzle project, so far I think the core mechanics are working properly, so I'll be creating some large test maps to see how it works out.
People2_5 & SF_Monster1 added!

Ami
--- X Costume ---

M.Healer: I'm wearing M.Mage's Costume.
M.Mage: I'm wearing M.Healer's Costume.
M.Knight: Why not using the Scary Costume like me,The Scary Frankenstein?
M.Healer: Err…Because we have low of Budget.
M.Mage: Yeah,right.
MV Plugin Showcase: Opening the in-game menu without pausing the background. :LZSgrin:

Forum statistics

Threads
104,601
Messages
1,007,461
Members
136,083
Latest member
gordola
Top