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.