0 votes
asked by (12 points)

Here is my code

require ("radio")

dataref("TRANSPONDER_MODE","sim/cockpit/radios/transponder_mode","writable")

function transponder_test_mode()

  if button((6*160) + 31) ==True then

    TRANSPONDER_MODE = 3 

    XPLMSpeakString("Transponder set to off")

  end

end

do_every_frame( "transponder_test_mode ()" )

function transponder_standby_mode()

  if button((6*160) + 30) ==True then

    TRANSPONDER_MODE = 1

    XPLMSpeakString("Transponder set to standby")

  end

end 

do_every_frame( "transponder_standby_mode ()" )

function transponder_alt_mode()

  if button((6*160) + 29) ==True then

    TRANSPONDER_MODE = 2 

    XPLMSpeakString("Transponder set to active")

  end

end

do_every_frame( "transponder_alt_mode ()" )

function transponder_ground_off_mode()

  if button((6*160) + 28) ==True then

    TRANSPONDER_MODE = 0 

    XPLMSpeakString("Transponder set to ground")

  end

end

do_every_frame( "transponder_ground_off_mode ()" )

Please log in or register to answer this question.

Welcome to X-Plane Q&A, where you can ask support questions and get answers from members of the community.

This site is for X-Plane support questions only. Please search for existing answers before posting your question. Off-topic questions will be locked.

If you’re new, you’ll need to register before asking your first question.

If your question is answered, click on the check mark to select the best response.

Categories

...