Author Topic: Need Help with Animation Code/Animation Code Request  (Read 1814 times)

0 Members and 1 Guest are viewing this topic.

Offline esarai

  • 29
  • Steathy boi
Need Help with Animation Code/Animation Code Request
Okay, so I'mma trying to make a Vertical Launch System for a ship that has doors that open whenever a missile is fired from the launcher, and I noticed that this is doable because of Bobbau's Animation Code.  What I need to use is:

Quote
$Animation: triggered
$type: turret firing
+sub_type: <model number of target turret>

However, there's a problem.  I don't know what the code is referring to by 'model number.'  Here's what the wiki says:

Quote
Syntax: +sub_type: Value, model number of the turret that triggers the animation. NOTE: This feature currently does not work on multipart turrets.

Since it's a value and not a string, it cannot be referencing the turret name.  What is the 'model number' that this expression is attempting to reference, and how does one go about finding it?  Could it perhaps be the turret number (if turretXX is the name, then the number is XX)?

Any help greatly appreciated.

EDIT:

Thanks to Nuke for the solution, that helped a lot.  As many people seem to be in favor of this, could we please change it so that the code uses turret subobject name rather than model number?
« Last Edit: April 26, 2010, 08:01:05 pm by esarai »
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

  

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Need Help with Animation Code
thats the submodel number from the pof file. if you open the model in pcs2 and drop down the subobjects tree, youl notice every object has a number in parentheses next to it, this is the subobject number. just find the submodel for the turret geometry, and use the number for that one. also this should be moved to modding.
« Last Edit: April 26, 2010, 07:12:25 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

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Need Help with Animation Code
No, it shouldn't. There's a usability issue here, where there's no reason why it should use the number when it could use the subsystem name instead.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Need Help with Animation Code
Yea looking up the subobject number is a pain and it changes just about every time your re-convert the model.  The only version of PCS2 that I know of that actually shows the number is 2.1alpha and that isn't a stable release.
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 esarai

  • 29
  • Steathy boi
Re: Need Help with Animation Code
I agree with everyone here, this should not use model number as it simply adds more steps to an already complex process.  From a modeler, using the turret's subobject name would be much more efficient and reliable.  So, as there seems to be strong will to change this, I have renamed the thread.
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Need Help with Animation Code/Animation Code Request
No, it shouldn't. There's a usability issue here, where there's no reason why it should use the number when it could use the subsystem name instead.

in that case i can see the point. subtype is a pretty generic value and i can understand why it confuses people. it does different things for every trigger type. making it a string might work better, but it would still be confusing, especially when using a primary/secondary weapons trigger (subtype is used on animations that occure while a bank is armed or disarmed). we could put a +subobject name: field that would work for all turret (or other physical subsystem) related animations, and likewise for other uses of subtype (so far only primarybank/secondary bank, they would need a +bank number: field), this would increase the number of fields that would need to be parsed, but would be easier for a new modder to get their head around. problem is every time a new animation type is added new fields to be parsed will also need to be added (unless theyre covered by an existing one).

on the other hand, this has been in the code base for years, and changing it is bout to affect some old mods. then again i never really considered it a complete system and i dont think it was very widely used (or at all), so i guess it wouldnt make too big of a mess to change it.
« Last Edit: April 26, 2010, 10:45:45 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