# VarsAndEventsAircraft The `VarsAndEvents` aircraft is a preset of the [WASM modular aircraft](../wasmaircraft/), which shows a simple example of the WebAssembly [Vars](../../../../programming-apis/wasm/vars-api/vars-api/) and [Events](../../../../programming-apis/wasm/event-api/event-api/) APIs. Once the [WASM](chartsaircraft/#) Aircraft package has been built, this module will be available for flying from the aircraft selection screen: {{< image-center src="images/7_Samples_Tutorials/Samples/WASMAircraft/VarsAircraft/vars_1_aircraft.png" alt="Selecting The Vars And Events Aircraft In The Simulation" >}}   The `WasmModules.sln` file (found in the `Sources` folder of the project) will allow you to compile the source-code with Microsoft Visual Studio (2019 or 2022) in order to create the `VarsAndEventsAircraft.wasm` WebAssembly module which will then be loaded by the simulation. Once compiled, the module will automatically be copied into the following folder: \[ROOT\]\(PackageSources\)SimObjects\(Airplanes\)MyCompany\_Wasm\_Aircraft\(presets\)mycompany\(VarsAndEventsAircraft\)panel   Note that if you make changes to the C++ code and recompile the vars and events WASM module, you will have to build your package again. This *can* be done while the plane is used within the simulation.     ### Testing Once you have built the aircraft and selected it, you can go into a **Free Flight** and you will see three panels in the cockpit: {{< image-center src="images/7_Samples_Tutorials/Samples/WASMAircraft/VarsAircraft/vars_2_screens.png" alt="The Cockpit Interior Of The Vars And Events Aircraft" >}}   In this sample the first two screens are similar to those in the [GaugeAircraft](gaugeaircraft/) however they retrieve the pitch, bank, and heading values using callbacks to the Vars API. The right-most screen will show a continuous stream of information related to events that the gauge has sent to itself containing different types of data. In this example the events sent are (in order): 1, 11ULL, 12ULL, 2, "a", 3, "b", "c", 13ULL. The screen will also change colour depending on the `K:` events received, where the `THROTTLE_DECR` event is *green* and `THROTTLE_INCR` event is *red*.