[RMXP] Changing the animation ID of a weapon/actor using scripts

Started by Seox, June 08, 2009, 07:54:45 pm

Previous topic - Next topic

Seox

First of all, just to let you know, I've been recycling my old topics with no replies, since I post threads so often. I don't know if that's ok, but I just figure that it's more considerate of the general elegance of the forum. Please let me know if it is in any way bad - the only thing that I can think of is the fact that "views" stays the same, although it's not like it's a contest or anything. I'm just trying to do my part, so I'm sorry if this is a bad idea.

For instance, this WAS my "how to display two way radio text" thread, but I changed it, since I got an answer elsewhere.

Ok, now for the question:

I'm using a materia script as a weapon attachment system, and want to make it so that if materia X, Y, or Z, for instance, are equipped, the current weapon animation changes to the animation for a suppressed ("silenced") weapon. It seems simple enough. I've tried doing a
# normal line, the variable is added, though
result = @actor.equip_materia
if result == 43 then @actor.animation_id = 110 ; end


But it plays the animation INSTANTLY, ON THE ACTOR, when the battle starts. In other words, when the battle begins, the actor is randomly SHOT with a suppressed weapon.

Yeah...

Any idea how to change the USER'S animation, ONLY WHEN THEY ATTACK?


Please and thank you ^_^
... (<<<<<<<<<<<<<<< TEH DOTS OF DOOM. Hey, kinda catchy. :naughty:)