dop2000's Forum Posts

  • You can use MoveTo behavior:

    Keyboard Is "Right" Key Down
    Player is not moving
    ... Player MoveTo (self.x+16, self.y)
    
    (and the same for other directions)
    

    The player will move 16px to the right, with acceleration and deceleration. If the key is still being held, it will start moving to the next cell.

  • I don't know what you are using the tokenat expression for. Is it to split the text into multiple lines? In this case you can continue using it of course.

    And with "Add 1", would I code it to be - on Tapped anywere --> Add 1 to "Row Variable" And it'll make it go down? And so I just make a "Column Variable" and "Sheet Variable"?

    Correct.

    And then use Array.At(columnVariable, rowVariable, sheetVariable) to actually get the value from the array.

  • Glad it works! You should be able to get the result into a global variable like this:

    runtime.globalVars.VarName = paramGotten;
    
  • What do you mean "vaguely"? There is a very detailed video tutorial and the project you can download!

  • Objects like Array, Dictionary, JSON are global by default. So they will maintain the data when you switch between layouts. Ideally you only need to load it once - I usually do this in the loaded layout.

  • Most subscription services (especially where you pay annually) send a notification a couple of days before renewing for another year. It's a common courtesy - maybe I don't need this subscription anymore, or I might want to change my payment details.

    Why doesn't Construct give such a warning?

    I just got charged for a friend's subscription which I had no intention to renew..

  • For example:

    JSON.Get("items.0.code")

    Use this tool to get paths for all JSON keys:

    dropbox.com/scl/fi/3lvdqp1x1v57xy0prahrj/JSON-RecursiveRead.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Without families this will be a bit tricky.

    In "Item overlapping Item" event at least two instances of Item are picked. If you use Item.variable in an expression, it will take the value from the first instance only.

    You need to use "For each Item" loop in a sub-event to iterate all instances.

  • Sorry, I'm not sure what a 'hidden' parameter is..

    The easiest way to know for sure is to test.

  • You don't need to do this via the Browser object, just google how to get query parameters with Javascript, there are several methods. For example:

    flaviocopes.com/urlsearchparams

  • Referencing elements in an array with variables is not difficult:

    Array.At(column, row, sheet)

    So you'll need three variables - column, row and sheet.

    Say, if column=1, row=4 and sheet=0, it will return "this is the box for the choicebox" line from your array. Add 1 to row variable and it will return the next line below it.

    I still don't quite understand your idea, but if the plot of the game is linear and dialogues are played one by one, it may work.

  • If you have a complex system of NPCs and dialogues, you might need to store the progress in some data object, I recommend JSON.

    For example, there may be a record in JSON for each NPC, where you can track if the player has talked to that NPC, how many times, their friendship status etc.

    {
    "NPC": "Governor",
    "DialogueCount": 2,
    "Location": "Town",
    "Attitude": "friendly"
    }
    
  • You can do this with a bit of scripting:

     if (runtime.objects["SpriteName"] == undefined) {
     
     console.log("Object name doesn't exist")
     
     }
    

    Use runtime.globalVars.varName or localVars.varName to exchange values between the script and events.

  • It's not possible.

    Why do you need to do this?

    You can use a global variable to store data between layouts. So when you switch to the second layout, check the value in the global variable and update the sprite if needed.