Use animation
From Unofficial QEdit Wiki Guide
Revision as of 21:18, 23 May 2013 by Japanaman2 (Talk | contribs)
Syntax
Syntax: use_animation register1, register2
- register1 = Reserved register 250 players slot number.
- register2 = Register containing the value of the animation to use.
List of animation values
https://i403.photobucket.com/albums/pp112/japanaman2/useanimationopcodetable_zps66a1ff67.jpg
Use
Used to make the player(s) preform e-motes through scripting.
Note: Making your animations run for more then 60 sync frames will cause pso to freeze.
In the list where it says animation cut short those animations still play at 60 sync frames but they are cut short. Everything they does not have the cut short note plays fine and ends either at or before 60 sync frames have passed.
Example
1: ret
100: get_slotnumber R250 //Stores the players slot number in register 250.
ret
101: sync //Waits 1 frame.
leti R1, 0000000D //Makes register 1 equal 0000000D.
leti R2, 0000003C //Makes register 2 equal 0000003C.
use_animation R250, R1 //Tells the player to do the animation value that is stored in register 1.
call 102 //Calls function 102.
stop_animation R250 //Stops the players e-mote animation and returns control to the player.
ret
102: sync //Waits 1 frame.
subi R2, 00000001 //Subtracts 00000001 from the value of register 2.
jmpi_= R2, 00000000, 1 //If register 2 equals 00000000 jump to function 1.
jmp 102 //Jumps to function 102.