need help with unit bouncing when shot.

need help with unit bouncing when shot.

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
wedge72
Posts: 15
Joined: 21 Aug 2011, 01:59

need help with unit bouncing when shot.

Post by wedge72 »

I was converting an old f14 unit from its fbi over to a lua just for consistency in the BA directory. I noticed some strange behavior when it was shot by a bantha's rocket, it was like the energy of the shot was transferred into it and the jet bounced away. I thought maybe the other planes did it and I just didn't notice, so I brought a few blades near the bantha to get shot. They were hit and didn't go pinballing away. I've been searching through the directories trying to find some clue in the files, but I can't seem to find what I missed. anyone know what is causing this ricochet type effect?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: need help with unit bouncing when shot.

Post by knorke »

and the jet bounced away.
was it destroyed?
If yes, it might just be the death animation script of the unit that throws the pieces of the model in random directions.
If the whole body+wings are made of one piece it will look like the unit is bouncing away.

weapons can have impulse too but not sure how they affect air units (in general and in BA)
Maybe low mass?

copied to Games & Mods forum.
wedge72
Posts: 15
Joined: 21 Aug 2011, 01:59

Re: need help with unit bouncing when shot.

Post by wedge72 »

Hi, thanks for the reply! Umm, no it wasn't destroyed. The rocket hits it and it bounces, and accelerates the jet off in the direction the rocket was heading. I thought it was something with the mass, but isn't the mass = buildmetal by default? The blade that I also flew in, and didn't bounce, actually has less buildmetal.
if I use the fbi file it works fine. I used the blade lua for a template when I copied the values from the fbi file, neither lua has a mass entry. I guess I'll try setting one really high and see...
wedge72
Posts: 15
Joined: 21 Aug 2011, 01:59

Re: need help with unit bouncing when shot.

Post by wedge72 »

ok, so now I feel really dumb. after looking at it yesterday for hours wondering what I was missing, today I noticed that when I went to build one it said metal cost: 1. Went back to the lua file and yes, I spelled build in buildcostmetal wrong, so it was being disreguarded. so disreguard me, and thank you so much for your help!
Post Reply

Return to “Game Development”