# GVARS for Drawing Shapes

## Recommended Posts

Hi FolksI know that GVARS can be used for many things, and to that end am building a TQ gauge that is simply a rectangle that "grows" dependant on the output of:(A:Eng1 torque percent, percent) (>G:Var6)The idea being to have GVAR6 determine the size of the rectangle. Cannot get it to work, as I guess I am not formatting G6 correctly:I assume it needs a conversion to an integer that the "RECTANGLE HEIGHT" can understand???any help is appreciatedSteve

##### Share on other sites
 Help AVSIM continue to serve you!Please donate today!

Not sure, but for setting values to previous inline statements it might be better to take them out. e.g.(G:Var6) d 0 == ? near One thing I also found was the use of HeightCode e.g.(G:Var6) d 0 == ? near Arne Bartels

##### Share on other sites

ArneTHAT did it !!!"One thing I also found was the use of HeightCode e.g.(G:Var6) d 0 == ? near "NOW I have a Vector Gauge.................Onwards and upwards.Thanks a MillionSteve

##### Share on other sites

ArneIt works great. It draws the rectangle from top to bottom, growing larger downwards as GVAR6 increases. I need the rectangle to be drawn from bottom to top. Any suggestions?Steve

##### Share on other sites

A combination with Shift? If you shift in Y direction by overall height - drawn height it should look as if the rectangle grows from bottom to top.E.g.151 (G:Var6) d 0 == ? near -(G:Var6) d 0 == ? near Arne Bartels

##### Share on other sites

ArneAgain you are dead on!!!I have already used this information to build into my helihud an aircraft directional indicator that has a vector line to indicate ground speed....so direction and GS!green when going forward and red when backwards. (A:Ground velocity, feet per second) 10 * (>G:Var2)GVAR2 just reads the ground speed and puts it in this rotating gauge element.(G:Var2) d 0 == ? near 10 * (A:Velocity world X, feet per second) (A:Velocity world Z, feet per second) atg2 (A:Magvar, radians) - (A:Plane heading degrees gyro, radians) - Steve

## Create an account

Register a new account

• Tom Allensworth,
Founder of AVSIM Online

• ### Hot Spots

• Flight Simulation's Premier Resource!

AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!