Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: headdie on January 03, 2011, 05:59:22 pm
-
first one was inspired by this thread (http://www.hard-light.net/forums/index.php?topic=73681.msg1454660#msg1454660) 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.
-
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.
-
first one was inspired by this thread (http://www.hard-light.net/forums/index.php?topic=73681.msg1454660#msg1454660) 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).
-
first one was inspired by this thread (http://www.hard-light.net/forums/index.php?topic=73681.msg1454660#msg1454660) 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]
-
What if the barrels are separated in a long string like this: |.........|.........|...........|..........|..........|.........| and the hull isn't that wide?
-
first one was inspired by this thread (http://www.hard-light.net/forums/index.php?topic=73681.msg1454660#msg1454660) 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.
-
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.
-
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.
-
id just go the script route myself