Author Topic: Movements-SEXPs, capship useful (v2.2)  (Read 7236 times)

0 Members and 1 Guest are viewing this topic.

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Release of Movements-SEXPs, capship useful (v1.5 May 17, 2020)
Updated to Version 1.5 which provides a very important bug fix for doing the automatic rotation time calculation. Also re configured script to run in $Simulation Hook per m!m's suggestion.

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Release of Movements-SEXPs, capship useful (v1.5 May 17, 2020)
Updated to version 1.6 which correctly calculates the default distance for ship tracking if the value was not specified. Thanks for EatThePath for catching this!

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Release of Movements-SEXPs, capship useful (v1.7 June 10, 2021)
Updated to version 1.7, which adds safety checks to ensure these scripts do not run in multiplayer. Also added to sexp descriptions that custom sexps will not work in multiplayer.

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Movements-SEXPs, capship useful (v1.7)
Updated to version 1.8 which includes two new custom sexps:

"set-bank-constant"
Sets the bank constant of a given ship. Bank constant is the amount of roll (bank) a ship does when turning (yawing).

"set-deceleration-time"
Sets the deceleration time of a given ship. Setting this to 0 will ensure that ships stop precisely at waypoints. Note, stopping may look a bit rigid if the ship is going very fast.

Also changed the "play-dead-persistent" order to be disabled by default.

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Movements-SEXPs, capship useful (v2.0)
Updated to version 2.0, which fulfills a long-term goal for default ship rotation--that the scripted rotations look identical to regular ship rotations (including momentum and damping). 

Important! You need an FSO build of August 24, 2022 or newer for these to work.

If you were using default values for rotation times for the custom sexps `rotate-to-orientation` or `add-ai-goal-track-ship` then this update will allow those rotations to look far more natural. 

Previously, this script set ship rotations based on a linear scale for all situations. This was fine if a precise rotation time was needed, but looked a bit rigid and unnatural if a default rotation time was desired. This update adds a new method for using the default rotation time. The overall amount of time the rotation takes is nearly the same, but the rotation looks much more smooth comparatively. This update also keeps the previous behavior and option for precise, specified rotations.

There are use cases for both.
  • Using specifying precise rotation times works on player ships too and can allow FREDers to manually time rotations to specific components of missions, such as music or other timed events.
  • Using the default rotation time (ie, not specifying a precise time and just using the ships normal, tabled values) only works for AI ships, but looks more natural.
 
« Last Edit: August 24, 2022, 09:50:54 am by wookieejedi »

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Movements-SEXPs, capship useful (v2.0)
EDIT: updated with hot-fix for folks who use `continuous-orientation-check` with relatively small distances.

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Movements-SEXPs, capship useful (v2.0)
Updated to version 2.1, which fulfills another long-term goal: Whether or not the ship should stop moving if it is about to hit something large. If set to true the ship will pause the current waypoint order and not resume again until the path is clear. Default value is false (no stopping for obstacles), so current implementation of sexps is still compatible.

Important! You need an FSO build of August 27, 2022 or newer for these to work.

  

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Movements-SEXPs, capship useful (v2.1)
Updated to version 2.2 which includes a new sexp and adds more functionality to another existing sexp.

Added `move-to-face-object` which has all the bells and whistles of `move-to-orientation` but is for rotating to face a ship or waypoint, not a specific orientation. Useful if you want one or more cap ships to rotate naturally to face a specific point or another ship. You might say, hey how is this different from the existing sexp 'set-object-facing'? With that sexp you have to call it every frame, and it is difficult to manually tune how long a rotation should take. With this new sexp, set it all once (including a delay, specific rotation time, or default natural rotation time) and let the sexp do the rest of the work for you.

Updated `add-waypoint-track-ship` sexp to now also be able to track another waypoint. The name remains the same for backwards compatibility, though the help text has been updated accordingly. This is useful if you want your waypoints to track other waypoints instead of just ships.