Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: --Steve-O-- on June 13, 2007, 09:46:13 am

Title: Animation code questions
Post by: --Steve-O-- on June 13, 2007, 09:46:13 am
i am making a fighter with a nasty beam cannon that has animated subobjects.
example. when you select the cannons gun bank, the physical part of the model opens up several vent panels at about 30 degrees angle, and when not selected the panels close.
will the animation code work for this...if not is there a way around it?
here's some screenies to give you all an idea. the model is not done yet by any stretch, still rough.
(http://i67.photobucket.com/albums/h308/t64smyhotrod/thor1.jpg)
(http://i67.photobucket.com/albums/h308/t64smyhotrod/thor.jpg)

and does anybody have a snippet of a tabled door animation i can take a look at? i'm trying to tidy up that cap for release in bettween.

oh and do you have to set the sub object rotation in PCS or does the Ani code take care of that on its own?
Title: Re: Animation code questions
Post by: Colonol Dekker on June 13, 2007, 09:54:02 am
I believe its part of te pof and table combined. Nuke would be the one to ask i think he's had success with flappy ships that open when you hit the afterburners, :nod:
Title: Re: Animation code questions
Post by: --Steve-O-- on June 13, 2007, 09:58:09 am
afterburner flaps and junk.....hmmm
Title: Re: Animation code questions
Post by: DaBrain on June 13, 2007, 10:33:48 am
http://youtube.com/watch?v=5pGoioPDIKM

It works. ;)


Anyway, everything linked to the animated part will move with it. (With the parent objcect.)
Title: Re: Animation code questions
Post by: --Steve-O-- on June 13, 2007, 10:42:51 am
awsome! dude, where do you find those weapon and explosion effects? those are amazing!
Title: Re: Animation code questions
Post by: DaBrain on June 13, 2007, 10:51:14 am
I made them... :nervous:
Title: Re: Animation code questions
Post by: Nuke on June 13, 2007, 11:06:58 am
see the chimera in nukemod

and you want to see total animation mayhem, wait till i finish vulture v3. eventually
Title: Re: Animation code questions
Post by: Wanderer on June 13, 2007, 11:50:39 am
http://www.hard-light.net/wiki/index.php/Animation_Code

You do not have to define the rotation in pof file.. However you must define the center of rotation for the submodels before conversion. Also IIRC animated objects have to be true subsystems or else they will not work (at least they had to have hitpoints).
Title: Re: Animation code questions
Post by: --Steve-O-- on June 13, 2007, 11:53:58 am
i cant get these frigin doors to work. the fighters launch and the doors stay closed
here is my data. i'm guessing i've got something wrong...i cant pin it.


--PCS Entry--

select subobject 073 (Door01)
model name: Door01
movement type: rotation around axis
movement axis: X axis
properties:
 $special=subsystem
 $name=Door01
 $rotate=-8
 $fov=360

(note: door02 has same info)

--TABLE ENTRY--

$subsystem: Door01
$animation: triggered
$type: door
 +delay: 10
 +reverse_delay: 10
 +relative_angle: 90,0,0
 +velocity: 40,40,0
 +acceleration: 40,30,0
 +time: 4000
$subsystem: door02
$animation: triggered
$type: door
 +delay: 10
 +reverse_delay: 10
 +relative_angle: 90,0,0
 +velocity: 40,40,0
 +acceleration: 40,30,0
 +time: 2000
Title: Re: Animation code questions
Post by: --Steve-O-- on June 13, 2007, 02:53:26 pm
i took a look at nukes Rumrunner and literaly copy pasted the data in both pcs and table and simply adjusted the relative angle and still nothing.
Do i need to bump up the build of the game? i'm running the latest of SCP 3.6.9.
Title: Re: Animation code questions
Post by: Bobboau on June 13, 2007, 06:52:12 pm
when you select the cannons gun bank, the physical part of the model opens up several vent panels at about 30 degrees angle, and when not selected the panels close.

that is EXACLY how it should work.

anyway to your problems, I think you don't have the model configured properly, there is (or was) a specal entree you needed in the submodel properties, also
"$rotate=-8
 $fov=360"

it might be a problem with the trigger it'self, try hooking the animation to something else and see if it works, I seem to recall there beeing a problem with door animations, something like them getting commented out at some point and nobody remembering to uncoment them, and then me fixing that and then all my changes getting reverted a month later.
Title: Re: Animation code questions
Post by: --Steve-O-- on June 18, 2007, 08:12:56 am
well i got the launch bay doors to work, kinda... they open during launch but never close even with +reverse delay set. is this normal?
anyways im getting closer to having to apply this tricky litte code to a fighter. should be fun...right?
Title: Re: Animation code questions
Post by: asyikarea51 on June 18, 2007, 09:08:43 am
Pardon me for asking all of a sudden, just that DaBrain's YT clip has got me curious.

Anybody played Doom 3 and seen the BFG9K? When the charge is at an early stage, the front part of the weapon opens up a bit. When it's charging up to the safe limit, it opens up more. When it's JUST about to detonate because of overcharging, it opens up all the way.

Or something like that IIRC.

Is a... "multi-stage" animation like that possible in FS?

:)
Title: Re: Animation code questions
Post by: Bobboau on June 18, 2007, 09:38:26 am
you can have mutable animations on a model tied to the same trigger but with a different delay, this can allow for something you could describe as a multi-stage animation.