UpdateItem¶
This is an update method that only applies to item entities. It only does anything if the sprite
exists.
- The
sprite
is disabled if theanimid
is 3 (this is a Crystal Berry) - If the
animid
is 0 or 1 (this is a standard or key item), thesprite
is assigned to the correspondingitemsprite[0, x]
where x is theitemstate
which is the item id. - If the
animid
is 2 (this is a medal), thesprite
is assigned to the correspondingitemsprite[1, x]
where x is theitemstate
which is the medal id. There is an exception to this: if flag slot 681 is true (MYSTERY? is active),overridemovesmake
is false anditemstate
isn't 59 (Extra Freeze), thesprite
is assigned toguisprites[190]
instead (the ? medal sprite)
After everything, if the sprite
is enabled with a backing sprite, the local position of spritetransform
is set to (0.0, the y extend of the sprite
's sprite, 0.0).