<?xml version="1.0" encoding="utf-8" ?>
<c2eventsheet>
    <!--All the 'name' attributes are ignored by Construct 2 - they are there for readability only.-->
    <name>DrapDrop</name>
    <events>
        <variable constant="0" name="filledCount" sid="528865922993012" static="0" type="number">-1</variable>
        <event-block sid="197106660861514">
            <conditions>
                <condition behavior="DragDrop" id="1" name="On drag start" sid="528907557634308" type="btn_WordItem" />
            </conditions>
            <actions>
                <action id="0" name="Play" sid="162558464641912" type="Audio">
                    <param id="0" name="Audio file">click</param>
                    <param id="2" name="Loop">0</param>
                    <param id="3" name="Volume">-2</param>
                    <param id="1" name="Tag (optional)">&quot;&quot;</param>
                </action>
            </actions>
            <sub-events>
                <event-block sid="266963171745346">
                    <conditions>
                        <condition id="-7" name="Compare instance variable" sid="673397366023432" type="btn_WordItem">
                            <param id="0" name="Instance variable">slotIndex</param>
                            <param id="1" name="Comparison">1</param>
                            <param id="2" name="Value">-1</param>
                        </condition>
                        <condition id="-7" name="Compare instance variable" sid="577869128870380" type="Slot">
                            <param id="0" name="Instance variable">index</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Value">btn_WordItem.slotIndex</param>
                        </condition>
                        <condition id="1" name="Is overlapping another object" sid="609479521709627" type="btn_WordItem">
                            <param id="0" name="Object">txt_WordItem</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-10" name="Set value" sid="445026196152632" type="Slot">
                            <param id="0" name="Instance variable">word</param>
                            <param id="1" name="Value">&quot;_&quot;</param>
                        </action>
                        <action id="-24" name="Move to top" sid="670463517581139" type="btn_WordItem" />
                        <action id="-24" name="Move to top" sid="538995332098798" type="txt_WordItem" />
                    </actions>
                </event-block>
                <event-block sid="816493828433722">
                    <conditions>
                        <condition id="-22" name="Else" sid="390659514117980" type="System" />
                    </conditions>
                    <actions />
                    <sub-events>
                        <event-block sid="487754364377713">
                            <conditions>
                                <condition id="1" name="Is overlapping another object" sid="443159185077976" type="btn_WordItem">
                                    <param id="0" name="Object">txt_WordItem</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-24" name="Move to top" sid="774809908055048" type="btn_WordItem" />
                                <action id="-24" name="Move to top" sid="501986465343455" type="txt_WordItem" />
                            </actions>
                        </event-block>
                    </sub-events>
                </event-block>
            </sub-events>
        </event-block>
        <event-block sid="946639210805430">
            <conditions>
                <condition behavior="DragDrop" id="2" name="On drop" sid="155941787306139" type="btn_WordItem" />
            </conditions>
            <actions>
                <action id="0" name="Play" sid="361413524752870" type="Audio">
                    <param id="0" name="Audio file">immersivecontrol-button-click-sound-463065</param>
                    <param id="2" name="Loop">0</param>
                    <param id="3" name="Volume">-2</param>
                    <param id="1" name="Tag (optional)">&quot;&quot;</param>
                </action>
            </actions>
            <sub-events>
                <event-block sid="504792991445212">
                    <conditions>
                        <condition id="1" name="Is overlapping another object" sid="845450333794375" type="btn_WordItem">
                            <param id="0" name="Object">Slot</param>
                        </condition>
                        <condition id="-8" inverted="1" name="Is boolean instance variable set" sid="204552588897544" type="Slot">
                            <param id="0" name="Instance variable">locked</param>
                        </condition>
                    </conditions>
                    <actions />
                    <sub-events>
                        <event-block sid="106550985509374">
                            <conditions>
                                <condition id="-15" name="Pick nearest/furthest" sid="170480452496238" type="Slot">
                                    <param id="0" name="Which">0</param>
                                    <param id="1" name="X">btn_WordItem.X</param>
                                    <param id="2" name="Y">btn_WordItem.Y</param>
                                </condition>
                                <condition id="-7" name="Compare instance variable" sid="938809230173413" type="Slot">
                                    <param id="0" name="Instance variable">word</param>
                                    <param id="1" name="Comparison">0</param>
                                    <param id="2" name="Value">&quot;_&quot;</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="800826128186269">
                                    <conditions>
                                        <condition id="-7" name="Compare instance variable" sid="542293663517978" type="btn_WordItem">
                                            <param id="0" name="Instance variable">slotIndex</param>
                                            <param id="1" name="Comparison">0</param>
                                            <param id="2" name="Value">-1</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-10" name="Set value" sid="568930528296173" type="Slot">
                                            <param id="0" name="Instance variable">word</param>
                                            <param id="1" name="Value">btn_WordItem.text</param>
                                        </action>
                                        <action id="-5" name="Set width" sid="848464562069708" type="Slot">
                                            <param id="0" name="Width">btn_WordItem.Width</param>
                                        </action>
                                        <action id="-10" name="Set value" sid="319064212608435" type="btn_WordItem">
                                            <param id="0" name="Instance variable">slotIndex</param>
                                            <param id="1" name="Value">Slot.index</param>
                                        </action>
                                        <action id="-10" name="Add to" sid="416857348260297" type="System">
                                            <param id="0" name="Variable">filledCount</param>
                                            <param id="1" name="Value">1</param>
                                        </action>
                                        <action id="15" name="Set Data" sid="419250460039333" type="SenaAI">
                                            <param id="0" name="Data 1">str(btn_WordItem.Text)</param>
                                            <param id="1" name="Data 2">str(Slot.index)</param>
                                            <param id="2" name="Data 3">&quot;&quot;</param>
                                            <param id="3" name="Data 4">&quot;&quot;</param>
                                            <param id="4" name="Data 5">&quot;&quot;</param>
                                        </action>
                                        <action id="16" name="Post Message" sid="278619922018473" type="SenaAI" />
                                    </actions>
                                </event-block>
                                <event-block sid="296319278611324">
                                    <conditions>
                                        <condition id="-22" name="Else" sid="250133201929726" type="System" />
                                    </conditions>
                                    <actions>
                                        <action id="-10" name="Set value" sid="347684935320096" type="Slot">
                                            <param id="0" name="Instance variable">word</param>
                                            <param id="1" name="Value">btn_WordItem.text</param>
                                        </action>
                                        <action id="-5" name="Set width" sid="166802160277172" type="Slot">
                                            <param id="0" name="Width">btn_WordItem.Width</param>
                                        </action>
                                        <action id="-10" name="Set value" sid="116855994129968" type="btn_WordItem">
                                            <param id="0" name="Instance variable">slotIndex</param>
                                            <param id="1" name="Value">Slot.index</param>
                                        </action>
                                        <action id="15" name="Set Data" sid="842443888451723" type="SenaAI">
                                            <param id="0" name="Data 1">str(btn_WordItem.Text)</param>
                                            <param id="1" name="Data 2">str(Slot.index)</param>
                                            <param id="2" name="Data 3">&quot;&quot;</param>
                                            <param id="3" name="Data 4">&quot;&quot;</param>
                                            <param id="4" name="Data 5">&quot;&quot;</param>
                                        </action>
                                        <action id="16" name="Post Message" sid="156485599688224" type="SenaAI" />
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <event-block sid="180540551233675">
                            <conditions>
                                <condition id="-22" name="Else" sid="806523891610870" type="System" />
                                <condition id="-7" name="Compare instance variable" sid="831308228851461" type="btn_WordItem">
                                    <param id="0" name="Instance variable">slotIndex</param>
                                    <param id="1" name="Comparison">1</param>
                                    <param id="2" name="Value">-1</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action behavior="MoveTo" id="1" name="Set maximum speed" sid="416883713281691" type="btn_WordItem">
                                    <param id="0" name="Max speed">1200</param>
                                </action>
                                <action behavior="MoveTo" id="4" name="Move to XY" sid="572186182608955" type="btn_WordItem">
                                    <param id="0" name="X">btn_WordItem.originX</param>
                                    <param id="1" name="Y">btn_WordItem.originY</param>
                                </action>
                                <action id="-10" name="Set value" sid="370498434376498" type="btn_WordItem">
                                    <param id="0" name="Instance variable">slotIndex</param>
                                    <param id="1" name="Value">-1</param>
                                </action>
                                <action id="-10" name="Add to" sid="250504698972287" type="System">
                                    <param id="0" name="Variable">filledCount</param>
                                    <param id="1" name="Value">-1</param>
                                </action>
                                <action id="15" name="Set Data" sid="506661306954504" type="SenaAI">
                                    <param id="0" name="Data 1">str(btn_WordItem.Text)</param>
                                    <param id="1" name="Data 2">&quot;-1&quot;</param>
                                    <param id="2" name="Data 3">&quot;d3&quot;</param>
                                    <param id="3" name="Data 4">&quot;d4&quot;</param>
                                    <param id="4" name="Data 5">&quot;d5&quot;</param>
                                </action>
                                <action id="16" name="Post Message" sid="412688010532382" type="SenaAI" />
                            </actions>
                        </event-block>
                        <event-block sid="664272208282422">
                            <conditions>
                                <condition id="-22" name="Else" sid="895425177786413" type="System" />
                                <condition id="-7" name="Compare instance variable" sid="246894625675163" type="btn_WordItem">
                                    <param id="0" name="Instance variable">slotIndex</param>
                                    <param id="1" name="Comparison">0</param>
                                    <param id="2" name="Value">-1</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action behavior="MoveTo" id="1" name="Set maximum speed" sid="888826482377214" type="btn_WordItem">
                                    <param id="0" name="Max speed">1200</param>
                                </action>
                                <action behavior="MoveTo" id="4" name="Move to XY" sid="393405307018971" type="btn_WordItem">
                                    <param id="0" name="X">btn_WordItem.originX</param>
                                    <param id="1" name="Y">btn_WordItem.originY</param>
                                </action>
                                <action id="-10" name="Set value" sid="503673017513230" type="btn_WordItem">
                                    <param id="0" name="Instance variable">slotIndex</param>
                                    <param id="1" name="Value">-1</param>
                                </action>
                                <action id="15" name="Set Data" sid="872163608896537" type="SenaAI">
                                    <param id="0" name="Data 1">str(btn_WordItem.Text)</param>
                                    <param id="1" name="Data 2">&quot;-1&quot;</param>
                                    <param id="2" name="Data 3">&quot;d3&quot;</param>
                                    <param id="3" name="Data 4">&quot;d4&quot;</param>
                                    <param id="4" name="Data 5">&quot;d5&quot;</param>
                                </action>
                                <action id="16" name="Post Message" sid="249407021381141" type="SenaAI" />
                            </actions>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="818745098688947">
                    <conditions>
                        <condition id="-22" name="Else" sid="929804756669469" type="System" />
                        <condition id="-7" name="Compare instance variable" sid="177859681995434" type="btn_WordItem">
                            <param id="0" name="Instance variable">slotIndex</param>
                            <param id="1" name="Comparison">1</param>
                            <param id="2" name="Value">-1</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action behavior="MoveTo" id="1" name="Set maximum speed" sid="449724002535088" type="btn_WordItem">
                            <param id="0" name="Max speed">1200</param>
                        </action>
                        <action behavior="MoveTo" id="4" name="Move to XY" sid="721292388859295" type="btn_WordItem">
                            <param id="0" name="X">btn_WordItem.originX</param>
                            <param id="1" name="Y">btn_WordItem.originY</param>
                        </action>
                        <action id="-10" name="Set value" sid="733212651291432" type="btn_WordItem">
                            <param id="0" name="Instance variable">slotIndex</param>
                            <param id="1" name="Value">-1</param>
                        </action>
                        <action id="-10" name="Add to" sid="739300525987860" type="System">
                            <param id="0" name="Variable">filledCount</param>
                            <param id="1" name="Value">-1</param>
                        </action>
                        <action id="15" name="Set Data" sid="712656902299986" type="SenaAI">
                            <param id="0" name="Data 1">str(btn_WordItem.Text)</param>
                            <param id="1" name="Data 2">&quot;-1&quot;</param>
                            <param id="2" name="Data 3">&quot;d3&quot;</param>
                            <param id="3" name="Data 4">&quot;d4&quot;</param>
                            <param id="4" name="Data 5">&quot;d5&quot;</param>
                        </action>
                        <action id="16" name="Post Message" sid="662902606044899" type="SenaAI" />
                    </actions>
                </event-block>
                <event-block sid="358120937494399">
                    <conditions>
                        <condition id="-22" name="Else" sid="416712700522674" type="System" />
                        <condition id="-7" name="Compare instance variable" sid="261187518957115" type="btn_WordItem">
                            <param id="0" name="Instance variable">slotIndex</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Value">-1</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action behavior="MoveTo" id="1" name="Set maximum speed" sid="431242330954619" type="btn_WordItem">
                            <param id="0" name="Max speed">1200</param>
                        </action>
                        <action behavior="MoveTo" id="4" name="Move to XY" sid="754072653542168" type="btn_WordItem">
                            <param id="0" name="X">btn_WordItem.originX</param>
                            <param id="1" name="Y">btn_WordItem.originY</param>
                        </action>
                        <action id="-10" name="Set value" sid="272960877861772" type="btn_WordItem">
                            <param id="0" name="Instance variable">slotIndex</param>
                            <param id="1" name="Value">-1</param>
                        </action>
                        <action id="15" name="Set Data" sid="303992708864385" type="SenaAI">
                            <param id="0" name="Data 1">str(btn_WordItem.Text)</param>
                            <param id="1" name="Data 2">&quot;-1&quot;</param>
                            <param id="2" name="Data 3">&quot;d3&quot;</param>
                            <param id="3" name="Data 4">&quot;d4&quot;</param>
                            <param id="4" name="Data 5">&quot;d5&quot;</param>
                        </action>
                        <action id="16" name="Post Message" sid="102997629264439" type="SenaAI" />
                    </actions>
                </event-block>
                <event-block sid="701043374178700">
                    <conditions>
                        <condition id="-7" name="Compare instance variable" sid="425036129926507" type="Slot">
                            <param id="0" name="Instance variable">word</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Value">&quot;_&quot;</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-5" name="Set width" sid="490670519672817" type="Slot">
                            <param id="0" name="Width">200</param>
                        </action>
                    </actions>
                </event-block>
            </sub-events>
        </event-block>
        <event-block sid="580675938654997">
            <conditions>
                <condition behavior="DragDrop" id="0" name="Is dragging" sid="411147921527630" type="btn_WordItem" />
            </conditions>
            <actions>
                <action disabled="1" id="-3" name="Set position" sid="610567804677855" type="btn_WordItem">
                    <param id="0" name="X">Touch.X</param>
                    <param id="1" name="Y">Touch.Y</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="622060364017684">
            <conditions>
                <condition id="-1" name="Every tick" sid="228576696549219" type="System" />
            </conditions>
            <actions />
            <sub-events>
                <event-block sid="108730370076990">
                    <conditions>
                        <condition id="-14" name="Compare variable" sid="538413628199561" type="System">
                            <param id="0" name="Variable">filledCount</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Value">end</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-15" name="Set visible" sid="445242465744130" type="btn_check">
                            <param id="0" name="Visibility">1</param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="218835501607731">
                    <conditions>
                        <condition id="-22" name="Else" sid="933470660702724" type="System" />
                    </conditions>
                    <actions>
                        <action id="-15" name="Set visible" sid="797052197521566" type="btn_check">
                            <param id="0" name="Visibility">0</param>
                        </action>
                    </actions>
                </event-block>
            </sub-events>
        </event-block>
        <event-block sid="382266478838536">
            <conditions>
                <condition behavior="DragDrop" id="2" name="On drop" sid="468373822389217" type="btn_WordItem" />
            </conditions>
            <actions />
            <sub-events>
                <event-block sid="669608212668633">
                    <conditions>
                        <condition id="-11" name="For Each" sid="763136610920305" type="System">
                            <param id="0" name="Object">Slot</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="35" name="Set Object Width" sid="216937320154014" type="SenaAI">
                            <param id="0" name="Index">loopindex</param>
                            <param id="1" name="Width">Slot.Width</param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="557294689920251">
                    <conditions />
                    <actions>
                        <action id="12" name="Calculate Object Positions" sid="903284616101407" type="SenaAI">
                            <param id="0" name="Count">int( SenaAI.getHintCount )</param>
                            <param id="1" name="Object Width">0</param>
                            <param id="2" name="Margin">5</param>
                            <param id="3" name="Max Width">1200</param>
                            <param id="4" name="Row Break">0</param>
                            <param id="5" name="Row Gap">100</param>
                            <param id="6" name="Type">&quot;slot2&quot;</param>
                            <param id="7" name="Group Gap">0</param>
                        </action>
                    </actions>
                </event-block>
            </sub-events>
        </event-block>
    </events>
</c2eventsheet>
