Author Topic: Fun times with the animation code...  (Read 1895 times)

0 Members and 1 Guest are viewing this topic.

Offline Kusanagi

  • A man, a van, a plan, Vanama!
  • 27
  • Enemy vessel captured
Fun times with the animation code...
I've been trying to figure out the animation code for a while now and made some progress last night on it with the Turanic Ion Array Frigate. The model has been set up correctly in MAX, converted to DAE, imported into PCS2 just fine.

I'm running into some interesting errors regarding both the animation code and the model itself.

The animation type is triggered by the (only) turret firing, so when it gets dropped into a mission which I've included, the "wings" open up when the beam-free or beam-free-all sexp is enabled on it. In theory, they should close down when the beam-lock sexp is enabled, or is it more complex than that? Because the panels have ended up closing about one time in ten when I test it.

When I originally saved the model as a PMF file, everything is fine and shows the bounding boxes where they should be. When I save it as POF file the array subobjects are wonky and the panels have no collision detection when open. I can shoot and run into them just fine when they're closed, but I can fly and shoot through them when they open. I have a feeling this has to do with the bounding box but I'm not sure.

EDIT: I found out what was wrong with the collision detection, but the animation code is still baffling me.
« Last Edit: August 23, 2010, 08:35:36 pm by Kusanagi »
Cum historia
mutat valde Razgriz
revelat ipsum
primum daemon scelestus est.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Fun times with the animation code...
there was a bug where you couldnt animate an object if it didnt have hitpoints, not sure if my fix made it into 3.6.12. i think you also need to put $triggered: in the submodel properties of the object which is being animated. i personally think the system needs to be ripped out and replaced with something more sane, since the animation code system has never worked consistently from build to build. i had to fix the animations in nukemod like 4 times already. nowadays i usually bypass the animation code and animate stuff with scripting directly.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Fun times with the animation code...
There are just bugs in the turret firing animation code.  I have a mantis issue on it http://scp.indiegames.us/mantis/view.php?id=2277 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Kusanagi

  • A man, a van, a plan, Vanama!
  • 27
  • Enemy vessel captured
Re: Fun times with the animation code...
Do you have any examples of scripting with animations, nuke?

I seem to have found a consistent workaround in FRED, where if I lock down the specific turret and not the beam weapon, the array closes.

I also found out why the collision detection is broken. The submodels extend out past the max radius of the hull model, and to my knowledge, there's no way to change that since that feature was purposely not put in PCS2. No idea how to fix it...any suggestions? Could I use a hex editor to change it?
Cum historia
mutat valde Razgriz
revelat ipsum
primum daemon scelestus est.

  

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Fun times with the animation code...
part of the cockpit demo has a section on animations. so far its only useful for cockpit control animations, im sure it wouldnt take much work to adapt it for external geometry. whether it would break collision detection or not hasn't been tested yet.

as far as i know, collision detection breaks if:

1. the object exits the radius for the ship
2. the object exits its own bounding box

to complicate things theres pretty much no easy way to edit the bounding box, your best bet is to put an invisible box around the part in question, it should cover the part in all of its positions, and it should have no collide invisible set. it should be attatched to the peice of geometry as well (not grouped but actually merged). this forces the subobject to have a bigger bounding box. this should also fix the radius issue.
« Last Edit: August 24, 2010, 03:25:47 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN