Im trying to set up enemy as animlayer, I dont know if this is the best way to do it or not, so you can also suggest me using somethng different.
Idea is that for example when enemy walks, i would keep changing frames in anim to make it look like its walking, and when enemy dies, display different frames of that animlayer.
However, i have trouble getting animlayers to display.
So this is what im doing currently:
Code: Select all
LoadBrush(1, "source" {Transparency=$FFFFFF})
CreateAnim(2, 1, 50, 50, 1, 1)
PlayAnim(2, 100, 100)
DisplayAnimFrame(2, 100, 100, 1)
It also seems that Animation does exist in some form there, since i can name that animlayer as "Enemy1" and it doesnt complain about layer being out of range and other setlayernames i have further in the code apply to right layers.
For if that anim layer wouldnt exist, then all the setlayernames would apply to IDs of 1 too early (as happened earlier when i didnt get animlayer to exist at all yet)
However, it doesnt display anything.
For shouldnt this piece of code already display the brushes image on animlayer? being a stable image?
Here is also the whole code i have so far, it can be run with Cubic IDE directly wihtout any changes, except that its missing the source image of brush:
http://dl.dropbox.com/u/3375468/Snowbal ... ngpart.hws
And if you check the whole code, you can also suggest me better snowball flying formula, it works but it doesnt feel too good.