I'm trying to make a teleporter effect which covers someone in swirly energy and conforms to the boundaries of their sprite. It's almost working, i'm 90% of the way there!
The result so far, as can be seen the swirly energy conforms perfectly. This is a ~10 second long .gif, you'll see the animation looping several times over
i.imgur.com/GeA8eYZ.gif
The problem however, is that the sprite used to create this energy is this:
i.imgur.com/SUChI31.png
There are two problems here.
First is that long delay i've set between frames - it should take 20 seconds to complete the animation, not two. This delay is just for debugging to confirm my suspicion that it's not working, my desired delay is 2.5 But it's evidence enough - this animation is playing at a preset delay of 1 decisecond between frames, and ignoring what i've set it to
Secondly, as can be seen there, ive set it to loop once (which basically means don't loop at all. Play from start to finish and then stop.) but as seen in the animation, its looping endlessly
So i need help figuring out these issues
My code is probably relevant
http://pastebin.com/dDXbQ5St
The effect is created by instantiating this object and passing in an atom (like a mob) into new to use as the target to copy the outline from
I copied and modified this from our bloodoverlay code. not looked too closely into how it works yet:
shape = new /icon(subject.icon, subject.icon_state)
shape.Blend(new /icon('icons/effects/teleport.dmi', rgb(255,255,255)),ICON_ADD) //fills the icon_state with white (except where it's transparent)
shape.Blend(new /icon('icons/effects/teleport.dmi', "fader"),ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
That first blend line doesnt specify an iconstate. The blood overlays use a plain white image as the first icon in the dmi, and it seems to point to that. So i'm thinking i can probably point that at a blank white image elsewhere, but for now i just copied it over
http://i.imgur.com/iUv5ByK.png
It might be relevant that i'm using this swirly effect as an overlay on the teleport object, and using its main icon_state as a different effect - i'm trying to combine two different effects in one object. i'm not exactly sure how to set the icon_state to a programmatically generated icon though
I'm having a similar problem with a completely different project too - an animated overlay playing too quickly, this one doesnt even use any masking or blending at all, its just an animated image used as an overlay
Is there a bug at work here? I need some helpp