title: How to only alert when boolean is false (AND/OR set variable with javascript in Construct 2)
body: <p>I am building an iOS-game in "<a href="https://www.scirra.com/construct2" rel="nofollow">Construct 2</a>" and trying to use the Phonegap-plugin "<a href="https://build.phonegap.com/plugins/714" rel="nofollow">Headset detection</a>" to alert if a Headset is not plugged in.</p>
  
  <p>I am able to create an alert-box (true/falls) to tell if the user has plugged in a headset via this:</p>
  
  <pre><code>&lt;button onclick="window.plugins.headsetdetection.detect(function(detected) {alert(detected)})"&gt;headphone detected?&lt;/button&gt;
  </code></pre>
  
  <p>But I am new to javascript, and would like to know:</p>
  
  <p>How do I:</p>
  
  <ul>
  <li>Only alert if the detection is FALSE?
  OR (even better):</li>
  <li>Let the above boolean variable set another variable inside Construct 2? (That way I can make other dependancies in my game design)</li>
  </ul>