Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Spoon on August 10, 2009, 07:30:43 pm

Title: An other quick question: Animation Sub-Type
Post by: Spoon on August 10, 2009, 07:30:43 pm
"# turret firing

    * Syntax: +sub_type: Value, model number of the turret that triggers the animation. NOTE: This feature currently does not work on multipart turrets."
How/where can one see the model number of a turret?
Title: Re: An other quick question: Animation Sub-Type
Post by: Nuke on August 10, 2009, 09:27:05 pm
look at the pof file
Title: Re: An other quick question: Animation Sub-Type
Post by: Spoon on August 11, 2009, 04:09:08 am
look at the pof file
I did, not sure what to look at. I want 'gunturret-8' to be the trigger but if I fill in 8 (or 9, taking turret-0 in account) it doesn't trigger. Whereas 6 for example works (even though thats a turret on the side that has no firing solution in the testing map)
I'm not seeing any other model number listed in PCS2
Title: Re: An other quick question: Animation Sub-Type
Post by: Vasudan Admiral on August 11, 2009, 08:24:04 am
Yeah Spoon is correct - only PCS1 displays the subobject number.

What are you trying to animate btw? If it's recoil you should be aware that turret firing won't do what you want - I've got a little feature in code limbo atm to make a 'turret fired' flag that does work but isn't quite complete yet. :)
Title: Re: An other quick question: Animation Sub-Type
Post by: Spoon on August 11, 2009, 10:38:55 am
Ah Thanks VA, PCS1 indeed shows model numbers
Though I am completely confused on how this code works.

Here's what happens:
I have 2 door subobjects that are suppose to open up when the main beam cannon is being fired (gunturret-8, model number 5. single part turret on the front). Alas when I fill in the subsystem
Code: [Select]
$Subsystem:                     door1, 15,0.0
$animation: triggered
$type: turret firing
+sub_type: 5
+delay: 10
+relative_angle: 0, 90, 0
+velocity: 0, 300, 0
+acceleration: 0, 100, 0
+time: 900
It won't open or close
However, when I replace the 5 with 6 (which is gunturret-0, a multi part turret on the back of the ship) the doors work fine! They even neatly close when its no longer firing.
 :confused:

On a seperate issue, the doors won't detect collision. Shots will fire through them and ships can fly through them as well.
Is this perhaps an issue with the 3ds max 6 plugin exporter? Or have others run into this as well?

Quote
I've got a little feature in code limbo atm to make a 'turret fired' flag that does work but isn't quite complete yet.
Nifty, looking forward to that  :D
Title: Re: An other quick question: Animation Sub-Type
Post by: Vasudan Admiral on August 12, 2009, 03:09:40 am
The collision detection issues are far more likely to be a problem with the engine really - not sure if we can expect a fix for that at least until the collision detection system in general is overhauled, so in the mean time try and keep the problem from being noticed (like just don't make giant fighter fly swats and the like and expect them to work ;) )

As for the subtype, it's possible that PCS1 is indicating the wrong number, or it could also be an off-by-one error in the submodel animation code somewhere. I'll have a look into the code side and see if I can spot anything.
Title: Re: An other quick question: Animation Sub-Type
Post by: Nuke on August 12, 2009, 06:46:07 am
look at the pof file
I did, not sure what to look at. I want 'gunturret-8' to be the trigger but if I fill in 8 (or 9, taking turret-0 in account) it doesn't trigger. Whereas 6 for example works (even though thats a turret on the side that has no firing solution in the testing map)
I'm not seeing any other model number listed in PCS2

hmm, for some reason pcs2 doesnt seem to show submodel numbers like it should. but you can use modelview for that purpose.

i also cant seem to get the animation to work. i know submodel numbers start with 0, the code might think it starts with 1. really i dont like the whole subtype setup, i think it would be better if you could just name the subsystem. the animation system was never fully completed in the first place.

im trying to make sence of the code in order to implement some new triggers, and types of animations (such as one way animations), and maybe fix some of its quirks. such as a bug where only subsystems with hit points may have animations.
Title: Re: An other quick question: Animation Sub-Type
Post by: Spoon on August 12, 2009, 05:18:30 pm
The collision detection issues are far more likely to be a problem with the engine really - not sure if we can expect a fix for that at least until the collision detection system in general is overhauled, so in the mean time try and keep the problem from being noticed (like just don't make giant fighter fly swats and the like and expect them to work ;) )

As for the subtype, it's possible that PCS1 is indicating the wrong number, or it could also be an off-by-one error in the submodel animation code somewhere. I'll have a look into the code side and see if I can spot anything.
Giant fighter fly swatter, that sounds awesome  :lol:
I'm encountering these clipping errors only with subobjects/subsystems that are attached to detail-0 (and are not turrets). Which makes me wonder how the Faustus got it right. Isn't that a big submodel/system attached to detail-0 as well? Collision seems to work just fine on that.

Quote
i also cant seem to get the animation to work. i know submodel numbers start with 0, the code might think it starts with 1. really i dont like the whole subtype setup, i think it would be better if you could just name the subsystem. the animation system was never fully completed in the first place.
Agreed on the that. Would be better indeed if one could just name the subsystem instead of this model number nonsense.

Quote
im trying to make sence of the code in order to implement some new triggers, and types of animations (such as one way animations), and maybe fix some of its quirks. such as a bug where only subsystems with hit points may have animations.
looking forward to the improvements  :D