Current SPAD.neXt Release: 0.9.12.123

This forum has closed. Please join our Discord Community.

SPAD.neXt online services are no longer available for SPAD.neXt Versions < 0.9.11.5

How to set a default value for a custom local variable?

General Discussions
Locked
GliderBen
Passenger
Posts: 1
Joined: 16 Sep 2020, 23:17
Status: Offline

How to set a default value for a custom local variable?

Post by GliderBen » 16 Sep 2020, 23:29

I created a local variable to hold the step size for the AP altitude selector. In short mode, I have it set to 500ft increments, and in long mode I set it to 100ft increments. This makes it faster to dial up the higher altitudes when flying jets/turboprops, but still gives me the ability to fine tune the altitude when necessary to comply with ATC assigned altitudes. The problem is, my local variable starts with a value of zero, so the altitude selector does nothing until I switch from short to long mode and the variable gets assigned a value. How can I assign a default value to the local variable?

User avatar
c0nnex
Site Admin
Posts: 5469
Joined: 10 Mar 2015, 21:52
Location: Munich, Germany
Contact:
Status: Offline

Re: How to set a default value for a custom local variable?

Post by c0nnex » 18 Sep 2020, 03:58

SPAD.neXt 0.9.8.6 :
Add a scripted event to the power-button that reacts on "Local->System->SPAD.neXt System Status" equals 1 , and set the value of your var to teh desired default
SPAD.neXt beta:
Default value can be given when creating the var. Not possible to edit it yet (can edit profile xml though) or use above event

Locked