[Ohrrpgce] Slice tutorial

S'orlok Reaves sorlok_reaves at yahoo.com
Mon Jan 19 20:52:38 PST 2009


I like this approach to slices a lot! In a few releases, I'll incorporate this approach into the OHRRPGCE FMF --it makes a lot more sense.

Here's an idea: make a slice "insurmountable". If you have:

parent_slice 
    child_slice_1
    child_slice_2
    child_slice_3, (insurmountable = true)
    child_slice_4
    child_slice_5

...then, adding a child slice to parent_slice will add it after child_slice_2. 

In this example, slices 3, 4, and 5 might be used to make some complex cursor (with a hat :D), and we want to enforce that new sprites are never added after it.

By adding the "insurmountable" property, we enforce this. And, if we want to explicitly add child_slice_6 after child_slice_5, we can still iterate to slice_5 and call "add sibling". So everybody wins.

That's my only suggestion; I feel it makes a lot of sense for cursors and other top-level objects (like hats). What do you think?
-->Seth
PS: Another use for this flag is if you want to give a sprite custom graphics depending on his armor: always make the helmet "insurmountable", and you can simply add/remove the weapon/armor/helmet slices in any order.



      



More information about the Ohrrpgce mailing list