Find all references in project

Get help using Construct 2

Post » Wed Dec 28, 2011 3:39 am

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.wgfunstorm2011-12-28 03:43:36
B
22
S
10
G
5
Posts: 122
Reputation: 5,466

Post » Wed Dec 28, 2011 3:59 am

You can find them in Layout xml
examples :
[code]<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>[/code]

Also, you can find them used in event sheets xml
examples :

In conditions
[code]<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>[/code]

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

In expressions
[code]<param id="0" name="X">Sprite.X-myVar</param>[/code]


Yann2011-12-28 04:00:12
B
63
S
22
G
14
Posts: 1,482
Reputation: 16,432

Post » Wed Dec 28, 2011 4:06 am

Also when in the event editor click on "events" on the top ribbon and use search.R0J0hound2011-12-28 04:08:37
B
85
S
27
G
85
Posts: 5,063
Reputation: 57,860

Post » Wed Dec 28, 2011 5:09 am

Awesome, thanks guys!
B
22
S
10
G
5
Posts: 122
Reputation: 5,466


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 10 guests