I have done this multiple times using code, but having brainfart with C2 drag&drop system, any help would be very welcome.
1) while inventory(0) < inventory.width let loop run trough array from first to final "slot".
2) If currentX equals 0 set string to get what X is first empty, then stop loop all together, no need to touch anything other as I want to get first empty (in this case "0") X location.
Here is my few attempts but they fail, some loop affect all X?s and other just stops after first one, does not run trough all values and then pick first 0.
This is inventory test where I want to put new item automatic to first empty slot available, since its random (maybe first slot is taken, maybe first, second, fourth but not third etc.).
<img src="http://media.rajatila.com/images/failurtpt.jpg" border="0" />
Develop games in your browser. Powerful, performant & highly capable.
<img src="http://www.blackhornettechnologies.com/Construct2Stuff/forwithstop.jpg" border="0">
You have to be careful not to mix context. "Stop loop" doesn't specify "while", only "for"-type commands, in it's help commands. The array object unfortunately doesn't have a "stop loop" either, so that doesn't help. These two examples do what you need in different ways.