IndieKiwi's Recent Forum Activity

  • Impressive dedication! Congrats on the milestone!

  • This doesn't include the Jungle assets - they are available when you get a license.

    Yep, and you'll get a link via email

  • (imo) Just because "33xx" simply works isn't a reason to use such a cast with non numerical numbers... Use regular expressions to extract the number first:

    (\d+)[/code:1wgkhukr] and then cast it to int
  • That is great! but i recommend not using on every tick as it could be constantly assigning the same text and drawing the text onto the canvas, which will have performance issues on something that is essentially static. Use something like a "do once", "for loop", on "layout load" etc could perform better.

    I haven't explored ajax or xml in construct 2 yet so i learnt something new too

  • Still don't work. I designed my xml as you recommended IndieKiwi, but it doesn't change anything

    The xpath is working for me. Its the other part of your logic that is broken, I've hardcoded Stage = 1, and used the first xpath from my other comment set to a new textfield named "test". It sets the value to "The First Stage" when its run.

    Changing Stage=2 would be The Second Stage etc.

  • >

    > Just create a new event checking that player locationnumber is less than players location make invisible or whatever

    >

    Thank u guys, it worked (not what i exactly had in mind but it is good)

    I did do exactly what u said locationnumber<location and magic thank u DUTOIT

    IndieKiwi, thank u for ur respond and help. Since im new to C2 is WebService the same as Webstorage ?

    Sry for the stupid question

    Thank u again

    Sorry i meant Webstorage, webservice is something else.

  • Alright, thank you guys. I change my xml file and now it's properly loaded.

    However,I get back now to my main question: can I just load the node that is equal to my global variable (named "Stage") ?

    Actually it only load the first node of the xml.

    I try different sting value like

    XML.StringValue("/stages/stage[ID='" & Stage & "']/name")[/code:a8uxp7cm]  (I get that from another topic) but i fail...
    

    This should work

    "/stages/stage/ID[contains(text(), '" & stage & "')]/following-sibling::name/text()"[/code:a8uxp7cm]
    ---
    
    If you designed your xml like below might be easier
    
    [quote:a8uxp7cm]<stages>
    <stage id="1">
    <name>The First Stage</name>
    <Level1>5</Level1>
    <Level2>500</Level2>
    <Level3>5000</Level3>
    </stage>
    </stages>
    
    
    [code:a8uxp7cm]"/stages/stage[@id='"&stage&"']/name/text()"[/code:a8uxp7cm]
  • If you want it semi-permanent (even if they close and open the game) add the WebService object and set a localkey with "1-layout" to start. on each map advancement, increment that name. When choosing the layout to load, make sure that the layout name is corresponding to that value ("1-layout). When you are ready to give them the next layout, set it to "2-layout"

  • Nice!

    How did you export it? I'm wondering which android export type is the best to enable the leaderboard and achievements on google play

  • Its possible already, you'll need

    1, AJAX object to make requests

    2. A server running a server side script like in PHP or asp.net

    3. And a SQL database.

    There are other ways, eg on Android you can use the GooglePlay login and make them sign in, and use the googleid as the identification, that way you won't need to worry much about security

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    Can this be deleted please, Its too big in resolution and for some reason i can't login to the arcade

    http://www.scirra.com/arcade/addicting- ... lat-bubble

  • > Hi I am trying to work out how to use Ajax and I am stuck on the POST side of the line for Construct2

    > this is the .php

    >

    $Username = mysqli_real_escape_string($con, $_POST['Username']);
    > $Password = mysqli_real_escape_string($con, $_POST['Password']);
    > 
    > $sql="INSERT INTO members (username, password)VALUES ('$Username', '$Password')";
    > [/code:3e2k85z8]
    > 
    

    You've probably figured it out now, but '$Username' takes the string literally (when using single quotation marks), it should be "$Username", and in this case it may also simply be $Username as other text isn't appended to the string.

IndieKiwi's avatar

IndieKiwi

Member since 1 Aug, 2014

Twitter
IndieKiwi has 2 followers

Connect with IndieKiwi

Trophy Case

  • 10-Year Club
  • Popular Game One of your games has over 1,000 players
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

14/44
How to earn trophies