0 Favourites

Fastest way?

  • Is there a way to do a find and replace? In the events sheet, lets say there is a set text to global variable "count 1". If I copy that Events Sheet to another, the Global Variable would go from "Count 1 to Count 2, but all the references to the GV would be 1. Anyway to do.. find "Count 1" replace with "Count 2" thx

  • Not as such.

    You maybe able to do it a hacky way by doing a "Save as project...". Which saves it as multiple files. Close C2. Then opening the event sheet xml with a text editor. Do a search and replace. Save and open in C2.

    P.S If I helped you then please return the favor and support me by liking me on facebook -> http://www.facebook.com/thewyrm

  • ahhh... let me check this. I will like you on fb, even if this does not work. thx

  • hmm.. i thought this would have been it. I'm not finding any reference of the GV's .. damn

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You should be able to see it. Look at my example.

    <?xml version="1.0" encoding="utf-8" ?>

    <c2eventsheet>

    <!--All the 'name' attributes are ignored by Construct 2 - they are there for readability only.-->

    <name>Event sheet 1</name>

    <events>

    <variable constant="0" name="GlobalVar" sid="9714360519691366" static="0" type="number">0</variable>

    <event-block sid="7018329122331523">

    <conditions>

    <condition id="-2" name="On start of layout" sid="299500794865517" type="System" />

    </conditions>

    <actions>

    <action id="0" name="Set text" sid="7509042542778953" type="Text">

    <param id="0" name="Text">GlobalVar</param>

    </action>

    <action id="1" name="Set size" sid="4423238529848415" type="Array">

    <param id="0" name="Width">10</param>

    <param id="1" name="Height">1</param>

    <param id="2" name="Depth">1</param>

    </action>

    <action id="2" name="Set at X" sid="2044702159796748" type="Array">

    <param id="0" name="X">0</param>

    <param id="1" name="Value">"Question 1 text"</param>

    </action>

    <action id="2" name="Set at X" sid="3481080486553087" type="Array">

    <param id="0" name="X">1</param>

    <param id="1" name="Value">"Question 2 text"</param>

    </action>

    <action id="2" name="Set at X" sid="9166454218324226" type="Array">

    <param id="0" name="X">2</param>

    <param id="1" name="Value">"Question 3 text"</param>

    </action>

    <action id="2" name="Set at X" sid="2295161434386167" type="Array">

    <param id="0" name="X">3</param>

    <param id="1" name="Value">"Question 4 text"</param>

    </action>

    <action id="2" name="Set at X" sid="3591827090944929" type="Array">

    <param id="0" name="X">4</param>

    <param id="1" name="Value">"Question 5 text"</param>

    </action>

    <action id="2" name="Set at X" sid="3335473294898624" type="Array">

    <param id="0" name="X">5</param>

    <param id="1" name="Value">"Question 6 text"</param>

    </action>

    <action id="2" name="Set at X" sid="8324247311191332" type="Array">

    <param id="0" name="X">6</param>

    <param id="1" name="Value">"Question 7 text"</param>

    </action>

    <action id="2" name="Set at X" sid="9071752183104546" type="Array">

    <param id="0" name="X">7</param>

    <param id="1" name="Value">"Question 8 text"</param>

    </action>

    <action id="2" name="Set at X" sid="4933738152892325" type="Array">

    <param id="0" name="X">8</param>

    <param id="1" name="Value">"Question 9 text"</param>

    </action>

    <action id="2" name="Set at X" sid="7629973087529539" type="Array">

    <param id="0" name="X">9</param>

    <param id="1" name="Value">"Question 10 text"</param>

    </action>

    <action id="0" name="Set text" sid="8331962340760189" type="Text">

    <param id="0" name="Text">Array.At(floor(random(10)))</param>

    </action>

    </actions>

    </event-block>

    <event-block sid="8630094855078521">

    <conditions>

    <condition id="6" name="On object clicked" sid="4589826014420757" type="Mouse">

    <param id="0" name="Mouse button">0</param>

    <param id="1" name="Click type">0</param>

    <param id="2" name="Object clicked">Text</param>

    </condition>

    </conditions>

    <actions>

    <action id="0" name="Set text" sid="8245938615069997" type="Text">

    <param id="0" name="Text">Array.At(floor(random(10)))</param>

    </action>

    </actions>

    </event-block>

    </events>

    </c2eventsheet>

    As you can see my GV is called GlobalVar and is created at the top and then specified in a "set text" action.

  • ok..weird. but it works. Not sure what was happening before, but yes, I can so a S&R ..thx.

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