Modding, Mission Design, and Coding > FS2 Open Coding - The Source Code Project (SCP)

Request for Comments: Programmable action system

<< < (2/3) > >>

Ok, that's pretty much what I already thought. Adding hooks for specific animation triggers is certainly possible and I'll take a look at this once the initial version is finished. However, the system you are describing would not be an improvement over the previous system since it would also only support rotation animations instead of also allowing translations. I have been thinking about replacing the animation system for some time now but I'll need to take a closer look at the existing code to understand what features the new system must support so that we don't break existing models.

It would be an improvement because even the existing animation system is inconsistently specified.  Twisted Infinities has a model that uses docking clamps, and a couple of years ago Vasudan Admiral and I were banging our heads against the wall trying to get it to work in all situations.

And yes, support for translations (linear movement) would be very nice to have.  But I consider that a separate - and mostly independent - problem.

Does the existing animation system support naming specific animations and then triggering them by specifying that name? Something like that would be within the scope of the action system (once the initial version is finished).

I don't want to add a system where the modder has to specify the actual animation in the table since those values are something that need to be generated by the modeling program.

Anyway, I'm currently working on adding support for local rotations and offsets to this system. I want to do this to support specifying complex actions on weapon impacts which requires a position relative to the impacted object and also a special orientation to make the effect relative to the hull of the object at the impact location.

I think the existing animation system was just a first-draft framework hacked around model rotations.  It's kind of backwards to what you are asking: at each stage of the docking path, the code looks for "docking animation 1" and runs it if it exists, then "docking animation 2" and so forth.  In the model file, you give your subobject joint the "docking animation 1" property if you want it to run at that point.

Defining specific animations and then triggering them by name is a better way to do it.  I disagree with you though: I think allowing the modder to specify them in the table file would be the best way to do it.  This is for two reasons: 1) editing a table file is much easier than editing a POF file, and 2) the POF format doesn't really have support for full-fledged animations.

I would really like something like this:

--- Code: ---$Name: Retract docking clamps
$Movement 1
+Subobject: clamp01
+Start angle: 0
+Stop angle: 45
+Duration: 2000
+Subobject: clamp02
+Start angle: 0
+Stop angle: -45
+Duration: 2000
--- End code ---


--- Code: ---$On Dock Path Point 4
+Retract docking clamps
+Delay: 4000
--- End code ---


Bumping this topic because this is 100% right up my street.

Has this had any additional options since release? I don't use beams in my current mod but I'd love to tie this to laser or missile turret fire, or stuff like warping in/out, damage, etc.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version