10-09-2002, 06:07 PM
|
#1
|
A Fire Beetle
Join Date: Oct 2002
Posts: 3
|
animated invintory class icon
How many frames can it be?¿
do you need to modify any xml or just create the tga files with the correct size and file name drop them in the dir and go?¿
|
|
|
10-09-2002, 07:52 PM
|
#2
|
A Shissar Disciple
Join Date: Sep 2002
Server: Quellious
Posts: 136
|
ok, here's how it's done:
You create your animation (however many frames you want) and paste them all together in one TGA file (remember the Alpha channel!)
Now, to make the animation, you define the texture:
<TextureInfo item = "Skelly_Animation.tga">
<Size>
<CX>512</CX>
<CY>1024</CY>
</Size>
</TextureInfo>
Then you define your frames:
<Ui2DAnimation item = "Skelly">
<Cycle>true</Cycle>
<Frames>
<Texture>Skelly_Animation.tga</Texture>
<Location>
<X>4</X>
<Y>10</Y>
</Location>
<Size>
<CX>120</CX>
<CY>200</CY>
</Size>
<Hotspot>
<X>0</X>
<Y>0</Y>
</Hotspot>
<Duration>150</Duration>
</Frames>
<Frames>
<Texture>Skelly_Animation.tga</Texture>
<Location>
<X>132</X>
<Y>10</Y>
</Location>
<Size>
<CX>120</CX>
<CY>200</CY>
</Size>
<Hotspot>
<X>0</X>
<Y>0</Y>
</Hotspot>
<Duration>150</Duration>
</Frames>
</Ui2DAnimation>
All the frames need to be within the same <Ui2DAnimation> tags.
The <Duration>1000</Duration> is 1 second, 250 is 1/4 a second, etc etc.
If you forget the <Cycle>true</Cycle> before listing your frames, it won't work. This is how you can use as many frames as you want.
Next, you place the image:
<StaticAnimation item= "Skelly">
<ScreenID>Skelly</ScreenID>
<Location>
<X>160</X>
<Y>40</Y>
</Location>
<Size>
<CX>120</CX>
<CY>200</CY>
</Size>
<Animation>Skelly</Animation>
</StaticAnimation>
and don't forget to add:
<Pieces>Skelly</Pieces>
at the end.
Pretty simple and straight forward :-) Good luck!!!
|
|
|
10-10-2002, 01:04 AM
|
#3
|
A Shissar Disciple
Join Date: Aug 2002
Server: Solusek Ro
Posts: 123
|
You might get some trouble using the above declaration.
Basically (and even in detail) that "how-to-do" is nicely done, BUT you must not define the same name twice.
In the above example the UI2DAnimation item is called "Skelly" and the StaticAnimation item is called "Skelly" too.
Now, I'm not sure if the items in the <pieces> tags are called by their item name or their screen ID but I'd go safe and define different names every time...
__________________
Velvet of Kane Bayle
aka Dorya of Solusek Ro
|
|
|
10-10-2002, 02:12 AM
|
#4
|
A Shissar Disciple
Join Date: Sep 2002
Server: Quellious
Posts: 136
|
Actually, that is part of the code I actually wrote for my inventory window. I set my autoequip area transparency to true and overlayed it with the animation... no problems at all! Except that I used screenshots of a pet and tried to duplicate the swaggering effect and he looks more likle Stevie Wonder's corpse the way he moves, but oh well... I'll get around to fixing it some day, lol!
It probably would be a better idea to do the item name (also <pieces>) as different name, ie. "A_Skelly". But, as I said before, I don't have any errors from it.
|
|
|
10-25-2002, 12:30 AM
|
#5
|
A Shissar Disciple
Join Date: Sep 2002
Server: -none-
Posts: 145
|
You are probably going to be fine as long as you dont have names colliding in the same 'family'
i.e. you can't have 2 UI2DAnimation's named 'skelly', but you can have a StaticAnimation and a UI2DANimation named 'skelly', each of those are of different types.
__________________
"I'm not a shrimp, I'm a KING PRAWN !" -- Pepe the shrimp.
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|