I couldn't find an answer anywhere, so I figured I might as well ask on the forum. Is there any way to intercept the mobile back button (or the search button for that matter), with the Windows 8 plugin ? I tried the classic Browser "on mobile back button pressed", but my phone kept minimizing the app.
I can't seem to be able to use the on back button condition anymore. Neither with the browser nor this plugin.
XPath use 1-based index, so to get the first question, use this :
/questions/question[1]/@text"[/code:1z9wnwkk] For the 2nd : [code:1z9wnwkk]/questions/question[2]/@text"[/code:1z9wnwkk] And so on so forth. In your case you could just ditch the for each node and directly use the action set text to : [code:1z9wnwkk]XML.StringValue("/questions/question[" & sporsmal & "]/@text")[/code:1z9wnwkk]
You need a separate list of indices. You can either generate it every time you want to fetch a new index or just keep it synced with the data in your array. It shouldn't be that costly to generate a new list every time, unless your array has thousands of values !
edit : I edited Seasky's example to illustrate both methods.
Oh, I did not fully understand the problem to begin with. To do that with the UID you'd have to loop through the UID ordered collection of your sprites and pick the first higher one... definitely not the way to go.
Develop games in your browser. Powerful, performant & highly capable.
A higher UID always mean a more recent instance, so ordering by UID to do the picking could work. But it's so much easier to go with sprite(sprite.count - 1) that there's no reason not to !
You might be able to achieve what you want with something like this.
I don't think loopindex works with the For each axis of the array object, use array.curX or array.curY instead. I don't think stop loop works either... so maybe you should just use a plain "for loop".
It is called by the addItem function. It first check if an item exists (index != -1), if so, add to its quantity, if not, add a new entry to the inventory array, and set its quantity to 1.
You probably want something like this. Pay attention to the itemIndex function. It returns -1 if the item isn't contained in the inventory, otherwise, it returns the index of the item.
Look at system expressions. Especially under the System group. You got that nifty projectversion variable !
I recently started creating the foundation for a retro RPG game. I stumbled on this thread so I thought I could share my work. Here's what I have so far. Download capx
I've made grid based movement using the tilemap plugin and rexrainbow's excellent MoveTo behavior.
Default keys for movement are WASD.
Member since 4 Jul, 2011