The new version of sprite bank had been released named instance bank.
To save some properties of sprite instances(save instances into bank), then create instance and set these properties(load instances from bank). A kind of serialization of sprite instance.
The chart of how to use it is -
<img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/file-6.png" border="0">
"Action: Save instances": saving properties of instances into bank
"Action: Load instances": create instances and set properties from bank
"Expression: BankToString": transfer bank to JSON string
"Action: Load bank": transfer JSON string to bank
The saved properties are
- inst.private variables
- custom data (*option)
For advance user, sprite bank provides calling function plugin when save/create instance. (See test_sprite_bank_adv.capx in example) It can do some custom actions like save/restore properties in behavior.
On saving instance, put data into return[name].
On creating instance, get data from prame(name).
So you can save the speed of bullet behavior then restore it when created.
Actually, the string of callback not only a function name, but also a command used in "action:execute commands", so you can put some parameters in the string.