Author Topic: A couple of requests  (Read 2483 times)

0 Members and 1 Guest are viewing this topic.

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
first one was inspired by this thread and is for SEXPs to read player issued orders, not only for a situation as mentioned in the thread but might also be useful to adjust a mission depending on player orders and to trigger messages.

Second one that I have been thinking about is for rotating single part turrets so they can track a target within a specified field of view.
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
How would you define the rotation of a single part turret?  Is the whole turret supposed to rotate?  Just part of it?  For example a single part turret with 3 barrels in a straight line several meters apart. 
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
first one was inspired by this thread and is for SEXPs to read player issued orders, not only for a situation as mentioned in the thread but might also be useful to adjust a mission depending on player orders and to trigger messages.

What's wrong with the Query-Orders SEXP? (It's in the training section IIRC so you might have missed it).
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
first one was inspired by this thread and is for SEXPs to read player issued orders, not only for a situation as mentioned in the thread but might also be useful to adjust a mission depending on player orders and to trigger messages.

What's wrong with the Query-Orders SEXP? (It's in the training section IIRC so you might have missed it).

found it, thanks for that

How would you define the rotation of a single part turret?  Is the whole turret supposed to rotate?  Just part of it?  For example a single part turret with 3 barrels in a straight line several meters apart. 

I was thinking the whole turret object around its centre with the rotation limits set in either the .pof or in the ship table

[attachment deleted by admin]
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
What if the barrels are separated in a long string like this:   |.........|.........|...........|..........|..........|.........| and the hull isn't that wide?
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 Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
first one was inspired by this thread and is for SEXPs to read player issued orders, not only for a situation as mentioned in the thread but might also be useful to adjust a mission depending on player orders and to trigger messages.

What's wrong with the Query-Orders SEXP? (It's in the training section IIRC so you might have missed it).

found it, thanks for that

How would you define the rotation of a single part turret?  Is the whole turret supposed to rotate?  Just part of it?  For example a single part turret with 3 barrels in a straight line several meters apart. 

I was thinking the whole turret object around its centre with the rotation limits set in either the .pof or in the ship table

so you want single part turrets that rotate? good luck, ive been asking for those forever.

though it would be fairly easy to compute an orientation based of target vector. you need to:

bring the target into the turret's frame of reference
pitch = atan2(target y, target z)
yaw = atan2(target x, target z)
matrixify pitch and yaw
apply matrix to turret submodel (you would need to multiply the base matrix (what would normally be derived from fvec and uvec) by this (i think) if you want anything other than an orthagonal axis facing turret)

actually i think i scripted something like this.
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 FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Why not make them multi-part?  The 50 rotation limit is or will soon be gone.  Using the base rotation and elevation should give you what you want.  Still doesn't work if you have 400+ barrels.
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

 
Just make a dummy invisible turret base and a visible turret arm, that will look like a rotating singlepart. Take a look at ASW's Zakros, for instance.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
id just go the script route myself
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