Results 1 to 1 of 1

Thread: Cycle through 3D, Chase and Ridealong.

  1. Default Cycle through 3D, Chase and Ridealong.

    Just in case some of you want to be able to access different views, using Jstick or Keyboard, without having to go to Menu.

    --[[This Script will Cycle through 3D, Chase and Ridealong. To use, copy this text to a file AnyName.lua and place it into your XP11... \Resources\plugins\FlyWithLua\Scripts, Start XPlane, Go to Settings>Joystick or Keyboard and in FlyWithLua Views Cycle Views, assign a button or Key to Cycle views. Go back to XP and use the button / key to cycle through views. Tested with XP11.40 and Win10.]]

    local last_view_type = 0

    --define the DataRef we want to use
    DataRef( "view_type", "sim/graphics/view/view_type" )
    --view_type == 1017 = Chase
    --view_type == 1026 = 3D
    --view_type == 1023 = HUD?

    function Cycle_Views()
    --if view_type == 1026 = 3D switch to Chase on next Jstk press
    if (( view_type == 1026 ) and ( last_view_type ~= 1026 ))
    or(( view_type == 1023 ) and ( last_view_type ~= 1023 )) then
    command_once( "sim/view/chase" )
    else
    --if Chase switch view/ridealong
    if ( view_type == 1017 ) and ( last_view_type ~= 1017 ) then
    command_once( "sim/view/ridealong" )
    else
    --switch to 3D on next Jstk press
    command_once( "sim/view/3d_cockpit_cmnd_look" )

    end
    end
    end

    -- create a Jstk command to execute Cycle_Views
    create_command("FlyWithLua/Views/Cycle Views", "Key to Cycle views", "Cycle_Views()", "", "")
    --



    Here is something Fun. It actually moves.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	SailBt16a.jpg 
Views:	8 
Size:	170.7 KB 
ID:	212322  
    Last edited by flytv1; 09-26-2019 at 11:02 PM.

Similar Threads

  1. Car chase on Dallas Love Field taxiways and runways!
    By American in forum The Outer Marker
    Replies: 9
    Last Post: 08-20-2010, 05:00 PM
  2. Loosing 3D Cockpit and Tower views in cycle ??"
    By lehbird in forum PC Hardware, Video And Audio Help
    Replies: 3
    Last Post: 02-02-2007, 09:19 PM
  3. Replies: 0
    Last Post: 01-26-2007, 12:15 PM
  4. Slicing Through The Clouds Like A Hot Knife Through Butter
    By AndrewG in forum MSFS Screen Shot Forum
    Replies: 18
    Last Post: 03-18-2005, 08:54 AM
  5. Replies: 2
    Last Post: 01-07-2003, 07:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •