Difference between revisions of "Use animation"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
 
Line 22: Line 22:
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:blue'>101:    </span><span style='color:green'>sync </span> <span style='color:orange'>//Waits 1 frame.</span>
 
  <span style='color:blue'>101:    </span><span style='color:green'>sync </span> <span style='color:orange'>//Waits 1 frame.</span>
  <span style='color:green'>        leti </span>R1, 0000000D <span style='color:orange'>//Makes register 1 equal 0000000D.</span>
+
  <span style='color:green'>        leti </span>R1, 0000000D <span style='color:orange'>//Makes register 1 equal 0000000D. (Animation value to use).</span>
  <span style='color:green'>        leti </span>R2, 0000003C <span style='color:orange'>//Makes register 2 equal 0000003C.</span>
+
  <span style='color:green'>        leti </span>R2, 0000003C <span style='color:orange'>//Makes register 2 equal 0000003C. (60 sync frames to count down.)</span>
  <span style='color:red'>        use_animation </span>R250, R1 <span style='color:orange'>//Tells the player to do the animation value that is stored in register 1.</span>
+
  <span style='color:red'>        use_animation </span>R250, R1 <span style='color:orange'>//Tells the player to do the animation value that is stored in register 1.(0000000D is the e-mote for pressing a switch).</span>
 
  <span style='color:green'>        call </span>102 <span style='color:orange'>//Calls function 102.</span>
 
  <span style='color:green'>        call </span>102 <span style='color:orange'>//Calls function 102.</span>
 
  <span style='color:red'>        stop_animation </span>R250 <span style='color:orange'>//Stops the players e-mote animation and returns control to the player.</span>
 
  <span style='color:red'>        stop_animation </span>R250 <span style='color:orange'>//Stops the players e-mote animation and returns control to the player.</span>

Revision as of 21:23, 23 May 2013

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. (Animation value to use).
         leti R2, 0000003C //Makes register 2 equal 0000003C. (60 sync frames to count down.)
         use_animation R250, R1 //Tells the player to do the animation value that is stored in register 1.(0000000D is the e-mote for pressing a switch).
         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.

Also see

ret, get_slotnumber, sync,

leti, use_animation, call,

stop_animation, subi, jmpi_=,

jmp, reservedregisters