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
9
G
5
Posts: 122
Reputation: 5,386

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
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

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
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Wed Dec 28, 2011 5:09 am

Awesome, thanks guys!
B
22
S
9
G
5
Posts: 122
Reputation: 5,386


Return to How do I....?

Who is online

Users browsing this forum: armaldio, plinkie and 19 guests