Author Topic: submodel animation triggers  (Read 4190 times)

0 Members and 1 Guest are viewing this topic.

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
submodel animation triggers
now the submodel animation code works pretty well. the only problem is the lack of trigger options. several modders (self included) are making moels that will use animations. so far theres like 6 or so triggers and was wondering when more will be added. now youre probibly gonna use the scripting system for complicated animations but id like to keep the existing system around for simple ones. either way your still gonna need a trigger relay of sorts in the code.  heres a few trigger ideas. i suggest other modders sugest some as well.

subspace- performs animation on entrance to supspace, and undoes when a ship comes out of subspace and acts as a initial position if the "mission takes place in subspace" flag is set.

afterburners-performs animation when afterburners are used and undoes the anumation when they go off.

weapon fire-performs animation when weapon is fired and undoes it before the weapon can fire again.

also id like a few more movement options. in addition +relative angle: would it be possible to have +absolute angle: (wich is really relitive to ship rather than subobject) wich will animate to that position regaurdless of where its rotated to, and +incrimental angle: wich makes it a one time pulse trigger and adds or subtracts to the current angle of the object and does not get undone (possible means for gatling turrets ).

another thing, make glopoints triggerable by the trigger system as well. with possibly +glowpoint on: (bank,slot), +glowpoint off: (bank,slot), +glowpoint toggle: (bank,slot). which would be added in somewhere amongst  the other animation fields.
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 WMCoolmon

  • Purveyor of space crack
  • 213
Re: submodel animation triggers
There already is a +absolute angle, I sort of assumed it was in world pos though.

http://www.hard-light.net/forums/index.php/topic,36737.0.html
-C

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Re: submodel animation triggers
Of the two things I can think of that would use world coordinates (basically the cockpit pod on the star-wars B-wing maybe, and a thruster array that was always supposed to point "down"), I can think of 200 that would use absolute model coordinates.  World is just asking for trouble almost all of the time.  The proper thing to do would be to add "global" coordinate support for world coordinates, and make "absolute" signify model coordinates, so that all possibilities could be supported.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: submodel animation triggers
woah, when were all these other options added. i was under the impression it hadnt changed at all sence i had originally tested it. the way i meant absolute angle wasnt in the way it seems to have been implemented. perhaps +goto angle: would be more apropriate. rather than moving from the current angle by x'y'z, it would move to x'y'z regaurdless of where its at.

 the primary/secondary bank trigger seems to be mislabled in function in the other thread, it doesnt happen when a weapon is fired but rather when a weapon is armed, the pf chimera uses it to unfold its wings and open the missile bay. but still i want a weapon fire trigger for recoil effects.
« Last Edit: November 15, 2005, 01:54:59 am 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 StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Re: submodel animation triggers
You know, has anyone ever actually used absolute for anything?  I'm guessing it's never even been tested.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: submodel animation triggers
i never knew it existed and offhand i cant think of anything that i would use it for. the goto mode however would be very usefull. also a mode to make a subobject counter-rotate perfectly when its inheriting a perents movement.
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 Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: submodel animation triggers
the absolute angle exsists and some suporting code is in place however useing it could majorly screw up angles as there would be no way to know if an object was in a nutral position or not, it was added to allow the useage of absolute degrees (in model coords) mixing and matching was never realy consitered, and I basicly stoped suporting it before even the first test builds, the more I thought about it the moore I realised that absolute coordanants would make things horably messy and weren't needed.

as for adding more triggers, I explained how to do it, in most cases it should requier only a few lines of code to add new triggers (one of the goals was to make the system easily expandable).
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: submodel animation triggers
While we're on the subject, is there a good reason that a couple of the fields use "$var=blahblah" style parsing? Or can I just swap those out for the usual kind of parsing stuff w/ a warning for the old method. (eg this is deprecated, please use new style)
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: submodel animation triggers
While we're on the subject, is there a good reason that a couple of the fields use "$var=blahblah" style parsing? Or can I just swap those out for the usual kind of parsing stuff w/ a warning for the old method. (eg this is deprecated, please use new style)

it does seem abit cluttered to me. the entries for the rumrunner's doors take up more space than the rest of the ship entries do. and that includes turrets. the chimera has about 13 animations in its list  i mean it takes two of theese:

Code: [Select]
$Subsystem: bdoor1,1,0
+non-targetable
$animation=triggered
$type="secondary_bank_2"
+delay:0
+relitive_angle:0,0,-60
+velocity:0,0,4000
+acceleration:0,0,80
+time:5000
just to get the missile launcher doors to open and another to lower the missile launcher. lets disect it.


Code: [Select]
$Subsystem: bdoor1,1,0 ;<- this should be here anyway
+non-targetable ;<- this really has nothing to do with an animation i guess it can stay
$animation=triggered ;<- now here this line really doesnt do anything but indicate the start of the animation and state that its triggered, ive never seen an animation that isnt
$type="secondary_bank_2" ;<- this line tells the game what will trigger the animation, i see no reason you cant use a variable list, like what you find on the subsystem line to put delays and the like
+delay:0 ;<-fancy that another line of text
+relitive_angle:0,0,-60 <-this is effietient it tels how to go to and where to go to, perhaps save some space and put the velocity and acceleration here too, can you have 3 vectors in a list?
+velocity:0,0,4000
+acceleration:0,0,80
+time:5000 <-you could probibly stick this on the trigger line too

would it be possible to do this
Code: [Select]
$Subsystem: bdoor1,1,0
+non-targetable
$trigger: secondary_bank_2,0,5000 ;trigger event,event data,delay,time
$movement: relitive (0 0-60),(0,0,4000),(0,0,80) ;movement type,(angle),(velocity),(acceleration)

its less cluttersome albeit more cryptic, but thats easyly solved as [v] ilustrated in its well commented tables.
« Last Edit: November 15, 2005, 04:48:49 am 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 Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: submodel animation triggers
I was intending to implement two seperate animation styles, triggered and linked, the linked animation I put off untill I had a good expression system to use, looks like that's comeing in the form of scripting suport.

the delay is needed, though I supose defaulting to 0 would be fine.

haveing all the data smashed into two lines without any lable would be a real pain, especaly for people learning how to use the code. I know it's a pain to remember wich number does what on the turret line, no harm in someone adding in a second opptional parseing method though.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: submodel animation triggers
i just think it should be made as shorthand as possible. it might be difficult at first but once you know it you would be glad its shortened. learning it wouldnt be nearly as hard as learning how to model. the way it is almost threw me off cause it used an = rather than a : , i remember i had a problem with that. i forgot what delay does, i guess its more usefull when youre dealing with a heirarcical animation.
« Last Edit: November 15, 2005, 06:10:38 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 FireCrack

  • 210
  • meh...
Re: submodel animation triggers
Dont froget the most important trigger of them all...

mission-Subtype is a name, a new sexp can call animtions of a cerian subtype to any ship/
actualy, mabye not.
"When ink and pen in hands of men Inscribe your form, bipedal P They draw an altar on which God has slaughtered all stability, no eyes could ever soak in all the places you anoint, and yet to see you all at once we only need the point. Flirting with infinity, your geometric progeny that fit inside you oh so tight with triangles that feel so right."
3.141592653589793238462643383279502884197169399375105820974944 59230781640628620899862803482534211706...
"Your ever-constant homily says flaw is discipline, the patron saint of imperfection frees us from our sin. And if our transcendental lift shall find a final floor, then Man will know the death of God where wonder was before."

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: submodel animation triggers
i was thinking about linked animations, trying to figure out why it would be nessicary to script simple linked animations like moving flight controls in a 3d cockpit. all youd really need is a link to a flight control axis and a range of motion value.

$Subsystem:    flight yoke1,1,0
+non-targetable
$animation=linked
$type="control_bank" ;axis being linked to
+minrange: 0,0,-60  ;range of motion
+maxrange: 0,0,60  ;proportional to control motion

this can also be used for stuff like control surfaces (not that they would do much good in space) and thrust vectoring nozzels. id like to see the controls in my ships working same as they do in starlancer or cfs3.
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 WMCoolmon

  • Purveyor of space crack
  • 213
Re: submodel animation triggers
Would everyone be fine with me swapping out the = with the : to make it more compatible, then? I don't think there are any official releases that use it yet, if there are I can make it a warning or something.
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: submodel animation triggers
i have no problem with that. i have no idea why bob did it that way in the first place.

what about an incremental animation. that increments the rotation once and doesnt reset back to its original position once the animation is done. could use it to make those gatling turrets ive been asking for, as well as wheels for ground vehicles. il also need a turret fires event for my gatling turrets.

$Subsystem:    thingie1,1,0
+non-targetable
$animation=triggered
$type="turret_fire_turretname"
+incremental_angle:0,0,5
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 WMCoolmon

  • Purveyor of space crack
  • 213
Re: submodel animation triggers
While I'm at it, I should also mention that I plan on making the +non-targetable and the damage carry flag for subsystems into another "$Flags:" sort of thing like ships...I dunno if anyone has released something with them, but I'll probably put a warning on, just in case. There are a number of other things that could be done, and the way those in particular are done in the code will get really wasteful after another two flags.
-C

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: submodel animation triggers
*Adds support to the More Triggers! request*
Submodel animation is the thing I've wanted most after the HTL engine, and even in this simplistic form it has enormous potential. Heck, if we get a weapon-fire animation as Nuke suggested, that we can link to a specific turret's firing, turret recoil of all sorts is a pinch. ;)
Other than that, I'd love to see a SEXP trigger, and Nuke's idea of an incrimental setting. :)

And I may as well point out in here that there's a bit of a bug when you restart a mission with any animations in it. It doesn't appear to reset them to their initial state again, which creates some odd effects with opening doors. ;)
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: submodel animation triggers
for the record the reason I used '=' rather than ':' was because this was origonaly going to go into the properties feild of the subobject.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: submodel animation triggers
im adding this to the feature request section of the wiki. be sure to add your mod to the 'supported by' list. and add any other triggers and features you have. im gonna add as much of the stuff mentioned in this thread as i can.
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 Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: submodel animation triggers
Added TI, and I'm sure there's plenty more who would want that sort of stuff too. :)
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities