gm-docs-parser 1.0.0

A collection of typings for GameMaker Studio 2 manual pages
Documentation
<?xml version="1.0" encoding="utf-8" ?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>

  <script type="text/javascript" language="JavaScript">
    //<![CDATA[
    function reDo() {
      if (innerWidth != origWidth || innerHeight != origHeight)
        location.reload();
    }
    if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
      origWidth = innerWidth;
      origHeight = innerHeight;
      onresize = reDo;
    }
    onerror = null;
  //]]>
  </script>
  <style type="text/css">/*<![CDATA[*/

    < !-- div.WebHelpPopupMenu {
      position: absolute;
      left: 0px;
      top: 0px;
      z-index: 4;
      visibility: hidden;
    }

    p.WebHelpNavBar {
      text-align: right;
    }

    -->
  
/*]]>*/</style>

  <script type="text/javascript">//<![CDATA[

    gRootRelPath = "../../../..";
    gCommonRootRelPath = "../../../..";
    gTopicId = "9.2.2.13";
  
//]]></script>

  <script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script>
  <script type="text/javascript" src="../../../../template/scripts/common.min.js"></script>
  <script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script>
  <script type="text/javascript" src="../../../../template/scripts/topicwidgets.min.js"></script>
<script type="text/javascript" src="../../../../whxdata/projectsettings.js"></script>
  <link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css"/>
  <link rel="stylesheet" type="text/css" href="../../../../template/Charcoal_Grey/topicheader.css"/>
  <meta name="topic-status" content="Draft"/>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Instances</title>
  <meta name="generator" content="Adobe RoboHelp 2019"/>
  <link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css"/>
  <meta name="rh-authors" content="Mark Alexander"/>
  <meta name="topic-comment" content="Page outlining the different functions and variables associated with Instances"/>
  <meta name="rh-index-keywords" content=""/>
  <meta name="search-keywords" content="Instances"/>
</head>

<body>
  <div class="topic-header rh-hide" id="rh-topic-header" onclick="rh._.goToFullLayout()">
    <div class="logo">
    </div>
    <div class="nav">
      <div class="title" title="Instances">
        <span>Instances</span>
      </div>
      <div class="gotohome" title="Click here to see this page in full context">
        <span>Click here to see this page in full context</span>
      </div>
    </div>
  </div>
  <div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div>



  <!--<div class="body-scroll" style="top: 150px;">-->
  <h1>Instances</h1>
  <p><b>Instances</b> are created from <a href="../../../../The_Asset_Editors/Objects.htm">Objects</a> and, once created, they can be changed and manipulated through GML code and DnD™ actions. The main instance functions related to instances that are available
    and most commonly used are:</p>
  <p> </p>
  <ul class="colour">
    <li><a href="instance_create_layer.htm">instance_create_layer</a></li>
    <li><a href="instance_create_depth.htm">instance_create_depth</a></li>
    <li><a href="instance_destroy.htm">instance_destroy</a></li>
    <li><a href="instance_exists.htm">instance_exists</a></li>
    <li><a href="instance_change.htm">instance_change</a></li>
    <li><a href="instance_copy.htm">instance_copy</a></li>
    <li><a href="instance_find.htm">instance_find</a></li>
    <li><a href="instance_furthest.htm">instance_furthest</a></li>
    <li><a href="instance_nearest.htm">instance_nearest</a></li>
    <li><a href="instance_number.htm">instance_number</a></li>
    <li><a href="instance_place.htm">instance_place</a></li>
    <li><a href="instance_place_list.htm">instance_place_list</a></li>
    <li><a href="instance_position.htm">instance_position</a></li>
    <li><a href="instance_position_list.htm">instance_position_list</a></li>
  </ul>
  <p> </p>
  <p>Note that there are two additional built in variables (these are <b>global scope</b> variables) and one function related to using instances which can be useful for retrieving certain details:</p>
  <p> </p>
  <ul class="colour">
    <li><a href="instance_id_get.htm">instance_id_get</a></li>
    <li><a href="instance_id.htm">instance_id</a></li>
    <li><a href="instance_count.htm">instance_count</a></li>
  </ul>
  <p> </p>
  <p>There are a number of built in variables available within each instance of an object that can be used to control different aspects of how the instance is displayed, how it uses other assets, and how it reacts to collisions, etc... which are all listed
    here:</p>
  <ul class="colour">
    <li><a href="Instance_Variables/Instance_Variables.htm"><span>Instance Variables</span></a></li>
  </ul>
  <p> </p>
  <p>Instances have an <a href="Instance_Variables/alarm.htm">array variable</a> that can be use to get or set Alarm Event values, but there are slo two functions that can be used to do the same thing:</p>
  <p> </p>
  <ul class="colour">
    <li><a href="alarm_get.htm">alarm_get</a></li>
    <li><a href="alarm_set.htm">alarm_set</a></li>
  </ul>
  <p> </p>
  <p>Finally, you also have the possibility of <strong>deactivating</strong> instances, which means they won&#39;t process any of their events, although they will still exist within the game. The functions relating to that are available from the following
    page:</p>
  <ul class="colour">
    <li><a href="Deactivating_Instances/Deactivating_Instances.htm"><span>Deactivating Instances</span></a></li>
  </ul>
  <p> </p>
  <p> </p>
  <p> </p>
  <div class="footer">
    <div class="buttons">
      <div class="clear">
        <div style="float:left">Back: <a href="../Asset_Management.htm">Asset Management</a></div>
        <div style="float:right">Next: <a href="../Rooms/Rooms.htm">Rooms</a></div>
      </div>
    </div>
    <h5>© Copyright YoYo Games Ltd. 2020 All Rights Reserved</h5>
  </div>
  <!-- KEYWORDS
Instances
-->
  <!-- TAGS
instance_functions
-->

</body></html>