You are not logged in.
(From Scripting Compendium)
6C Variable sprites:
Writes a number to the variable sprite RAM from D555 to D564 (see Compendium on the sprite system).
xx: Number between 0x00 and 0x0F
Can anyone explain how this actually works?
I know this is used after the encounter with Silver in Olivine City to change Silver's sprite into a male swimmer's, but I don't understand how it works.
Last edited by Munchulax (2012-12-02 02:26:07)
“To live is the rarest thing in the world. Most people exist, that is all.” ― Oscar Wilde
You would use the map's script header here. In the most basic way of doing it, you'd have an event for trigger timing 0 that loads one sprite. Then to make it show another sprite later, you would have a script that runs on trigger timing 1 that loads the other sprite.
Check them out on Github
The sprite RAM is stored permanently. There is no need to reload it using a trigger or map entry script. Just be sure you initialize it somewhere (if 0x00 doesn't fit your need initially, which is likely) and off you go.
In case it isn't clear, xx is the slot number, i.e. 0x00 ^= 0xD555 ... 0x0F ^= 0xD564. Then use sprite indices in the upper 0xEx, 0xFx range (see guide) to actually display the selected sprite. It is supposed to be used on inside maps, so I guess for overworld maps you will have to have the corresponding sprites defined in the applicable spriteset.
Last edited by Tauwasser (2012-09-21 14:51:40)
I went through and wrote down which of the variable sprites are used and what they are used for, as well as what they default to and where the script is that initializes them.
Edited by game scripts (cannot be edited with this command, but are still variable) ----------------------- E0 - Pokemon with Daycare Man E1 - Pokemon with Daycare Lady Editable by you with scripts ---------------------------- F0 - Game System in Room F1 - Left Table Decoration F2 - Right Table Decoration F3 - Big Pokedoll in Room F4 - Defaults to Sudowoodo, Then used by Girls (Route 36 & 37) F5 - Defaults to Rival, Then used by Swimmer (Olivine & Route 40 & 41) F6 - Defaults to Rocket, then Rival (Azalea Town) F7 - Janine Gym 1 F8 - Janine Gym 2 F9 - Janine Gym 3 FA - Janine Gym 4 FB - Defaults to Girl (Copycat girl) FC - Defaults to Girl, then Janine (Fuschia Pokecenter) FD - Unused FE - Unused FF - Unused x10048E - Script that sets their original sprites - Ignores the decorations, as well as FD, FE, and FF
That location isn't necessarily the start of the entire script, but the start of the 0x6C commands that actually initialize these.
Last edited by Mateo (2012-12-02 02:22:41)
Check them out on Github