[21 Dec 2009] Trying to set up Anim as ingame character.
Posted: Sat Jun 13, 2020 5:32 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 21 Dec 2009 05:57:39 -0000
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:
Now i do know source of brush is right, since i can displaybrush and it shows it correctly and even move it around.
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.
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.