Post new topic    
Liquid Metal Slime
Send private message
How to make slice appear below hero 
 PostSat Mar 07, 2015 7:22 pm
Send private message Reply with quote
I have my boomerang slice which is parented to the hero. I would like to make said slice appear under the hero rather than over top of the hero. How do I do this?

I tried:
Code:
            set parent(Boomerang, get hero slice (0))
            move slice below (Boomerang, get hero slice (0))


But it didn't work, so maybe I'm not understanding this right...
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Metal King Slime
Send private message
 
 PostSat Mar 07, 2015 11:00 pm
Send private message Reply with quote
Hero slices are special and hardcoded and can't be reorganized that way. If you want your boomerang to appear under your hero, you'll (probably?) have to parent it to one of the map layers (because heroes are drawn over the map layers), and then use put slice to put it where the hero slice is.
Liquid Metal Slime
Send private message
 
 PostSun Mar 08, 2015 12:20 am
Send private message Reply with quote
Sounds good. I'll attempt that later and let you know if there's any further issue.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Liquid Metal King Slime
Send private message
 
 PostSun Mar 08, 2015 12:55 am
Send private message Reply with quote
Parent it to the hero slice, then move it before the hero walkabout sprite component. I'm on my phone so I can't type up the example right now, but it isn't too hard
Liquid Metal Slime
Send private message
 
 PostSun Mar 08, 2015 1:13 am
Send private message Reply with quote
Bob the Hamster wrote:
Parent it to the hero slice, then move it before the hero walkabout sprite component. I'm on my phone so I can't type up the example right now, but it isn't too hard


Sorry I'm not sure if I understand what you mean. Probably to replace "get hero slice (0)" with walkabout sprite component in my current script? Either way you have some time to respond before I get around to this.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Metal King Slime
Send private message
 
 PostSun Mar 08, 2015 1:53 am
Send private message Reply with quote
I think what he means is something like:

Code:

variable (DaBoomer)
variable (DaHero)
variable (GoUnder)
DaBoomer := CreateRect (20,20)
DaHero := GetHeroSlice (me)
GoUnder := lookupslice (sl:walkabout sprite component,DaHero)
SetParent (DaBoomer,DaHero)
MoveSliceBelow (DaBoomer,GoUnder)


Didn't compile it and test, but fussin around in the slice collection editor it did work
Liquid Metal Slime
Send private message
 
 PostSun Mar 08, 2015 9:32 pm
Send private message Reply with quote
Thanks, looks good!
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Display posts from previous: