Find all references in project

0 favourites
  • 4 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • Is there an easy way to find all references of a variable in a project?

    Right now I'm just opening up the XML and using notepad to search.

    Search didn't turn up anything.

  • You can find them in Layout xml

    examples :

    <instance type="Sprite">
       <properties>
          <initial-visibility>Visible</initial-visibility>
          <initial-frame>0</initial-frame>
          <effect>(none)</effect>
        <auto-mirrorflip>(none)</auto-mirrorflip>
       </properties>
       <instance-variables>
          <myVar>0</myVar>          <----- There
       </instance-variables>
       <behavior-instances>
          <behavior-instance type="CustomMovement">
              <properties>
                 <stepping-mode>None</stepping-mode>
                 <pixels-per-step>5</pixels-per-step>
              </properties>
          </behavior-instance>
       </behavior-instances>
       <world>
          <x>64</x>
          <y>64</y>
          <z>0</z>
          <width>32</width>
          <height>32</height>
          <depth>0</depth>
          <angle>0</angle>
          <opacity>1</opacity>
       </world>
    </instance>

    Also, you can find them used in event sheets xml

    examples :

    In conditions

    <condition id="0" name="Compare instance variable" type="Sprite">
       <param id="0" name="Instance variable">myVar</param>
       <param id="1" name="Comparison">2</param>
       <param id="2" name="Value">32</param>
    </condition>

    In actions

    <action id="0" name="Set value" type="Sprite">
       <param id="0" name="Instance variable">myVar</param>
       <param id="1" name="Value">24</param>
    </action>

    In expressions

    <param id="0" name="X">Sprite.X-myVar</param>
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Also when in the event editor click on "events" on the top ribbon and use search.

  • Awesome, thanks guys!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)