Page 1 of 1

animations.xml - Make lasers fly in different directions

Posted: Tue Oct 09, 2012 9:00 pm
by Absu
I was hoping I could make things like missiles and lasers fly in other directions than left to right. It doesn't seem possible but I thought I'd post here to see if I've missed something.

I'll just go through what I've found. Take the ion-blaster for example. It have got these entries:

Code: Select all

<animSheet name="ion_1" w="240" h="50" fw="30" fh="50">weapons/ion_1_strip8.png</animSheet>


Which is where the gun-texture is rendered.

Code: Select all

<weaponAnim name="ion_1">
   <sheet>ion_1</sheet>
   <desc length="8" x="0" y="0"/>
   <chargedFrame>1</chargedFrame>
   <fireFrame>5</fireFrame>
   <firePoint  x="17" y="7"/>
   <mountPoint x="9" y="35"/>
   <chargeImage>weapons/ion_1_glow.png</chargeImage>
</weaponAnim>


Is responsible for the glow on the gun when it's fired.

These however seem to control the actual bullets that I would want to change:

Code: Select all

<animSheet name="ion_1_shot" w="192" h="24" fw="24" fh="24">weapons/ion_1_shot_strip8.png</animSheet>

<anim name="ion_1_shot">
   <sheet>ion_1_shot</sheet>
   <desc length="8" x="0" y="0"/>
   <time>0.3</time>
</anim>


Changing fh and fw however seem to be like changing the size of the area the texture for the bullet is rendered on, then it's repeating on default and the bullet is rendered over and over again... The attributes h and w are really a mystery though, but it's not doing anything like what I want.

Changing the values in the second tag doesn't seem to do anything. "desc" seem to incadicate it've got something to do with the placement and time the description for the gun stay but I didn't notice any difference.

Anyway, just thought I'd check. The real question perhaps is if anyone have seen a gun that doesn't fire in a straight line from left to right. If there isn't it really makes no sense that you could change something like it. Just going through the file it doesn't seem like there are.

Re: animations.xml - Make lasers fly in different directions

Posted: Tue Oct 09, 2012 9:28 pm
by Whale Cancer
Absu wrote:I was hoping I could make things like missiles and lasers fly in other directions than left to right. It doesn't seem possible but I thought I'd post here to see if I've missed something.

I'll just go through what I've found. Take the ion-blaster for example. It have got these entries:

Code: Select all

<animSheet name="ion_1" w="240" h="50" fw="30" fh="50">weapons/ion_1_strip8.png</animSheet>


Which is where the gun-texture is rendered.

Code: Select all

<weaponAnim name="ion_1">
   <sheet>ion_1</sheet>
   <desc length="8" x="0" y="0"/>
   <chargedFrame>1</chargedFrame>
   <fireFrame>5</fireFrame>
   <firePoint  x="17" y="7"/>
   <mountPoint x="9" y="35"/>
   <chargeImage>weapons/ion_1_glow.png</chargeImage>
</weaponAnim>


Is responsible for the glow on the gun when it's fired.

These however seem to control the actual bullets that I would want to change:

Code: Select all

<animSheet name="ion_1_shot" w="192" h="24" fw="24" fh="24">weapons/ion_1_shot_strip8.png</animSheet>

<anim name="ion_1_shot">
   <sheet>ion_1_shot</sheet>
   <desc length="8" x="0" y="0"/>
   <time>0.3</time>
</anim>


Changing fh and fw however seem to be like changing the size of the area the texture for the bullet is rendered on, then it's repeating on default and the bullet is rendered over and over again... The attributes h and w are really a mystery though, but it's not doing anything like what I want.

Changing the values in the second tag doesn't seem to do anything. "desc" seem to incadicate it've got something to do with the placement and time the description for the gun stay but I didn't notice any difference.

Anyway, just thought I'd check. The real question perhaps is if anyone have seen a gun that doesn't fire in a straight line from left to right. If there isn't it really makes no sense that you could change something like it. Just going through the file it doesn't seem like there are.


h = height of the sprite strip, w = width of the sprite strip

desc describes the length of the sprite strip along with offsetting

From all my experimentation with animations, I don't think you can change the direction which the projectiles fly.

Re: animations.xml - Make lasers fly in different directions

Posted: Thu Oct 11, 2012 12:35 am
by Zalkida
Whale Cancer wrote:
From all my experimentation with animations, I don't think you can change the direction which the projectiles fly.


I would suspect that the actually movement of the projectiles is hardcoded, but I could be wrong.

Re: animations.xml - Make lasers fly in different directions

Posted: Sat Oct 13, 2012 10:51 am
by Law
Absu wrote:Changing fh and fw however seem to be like changing the size of the area the texture for the bullet is rendered on, then it's repeating on default and the bullet is rendered over and over again...


fh and fw seem to define a size of a sprite within the image. I've found it's for animated sprites like a weapon charging and firing. where h and w tell FTL the height and width total of the image, fh and fw are there to tell FTL how large each sprite actually is.