dop2000's Forum Posts

  • Not sure what exactly are you asking, but dealing with JSON is pretty straightforward once you understand its structure. There is a unique path to every bit of data in JSON. For example JSON.Get("data.competition.0.federations.0.name") will return "UEFA".

    You can use relative path, for example inside "For each entry" loops:

    For Each entry in "data.competition"
     Console log JSON.Get(".name") 
    

    ".name" here is a relative path, this code will print all league names in the "data.competition" array.

    More info in the documentation:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/json

    There are plenty of online tools which will help you to convert JSON string to human-readable format and explore its structure, for example:

    jsonformatter.org

    jsonpathfinder.com

    Also I always recommend this small project, it shows full paths to all keys:

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

  • This is clearly a bug, I suggest reporting it here:

    github.com/Scirra/Construct-bugs/issues

    You can mention in the report that it may be related to this issue.

    Also, if you haven't done this already, I suggest disabling BBCode on text objects.

  • Press F12 in preview and check for error messages in the console.

  • Check out R0j0hound's comments in this old thread:

    construct.net/en/forum/construct-2/how-do-i-18/3d-carousel-42745

  • If you know the exact number of parameters, then just list them after the function name, for example with two parameters:

    runtime.callFunction("prova", 10, 20);

    or

    runtime.callFunction("prova", "text", "some other text");

  • If you want to reduce volume for a particular sound, say by 30%, you can do this:

    (log10(volumePercentage*0.7/100)*20)

  • The same objects you have in your "On tap" events - sprite6, sprite7.

  • By setting Y velocity to 0, you are not allowing it to move vertically.

    Use Object.Physics.VelocityY instead of 0.

    .

    If you need to switch between Physics and some other behavior preserving the momentum, you can use velocity values. Say, when switching to Platform, set Platform vectors X/Y to physics.velocityX/Y

  • You are using the wrong condition. "Contains value" searches the entire array. You need "Compare At XY", where X=Array.CurX and Y=2

  • Don't change its Y velocity.

    Why do you need Physics?

  • I would suggest using another behavior, but if you absolutely need Physics, you can set velocity instead of applying force.

    Is key down: Object set velocity X to 100

    Else : Object set velocity X to 0

  • You don't need to go through all values in the array. Say, if there are 100 objects and 5 lines, "For each XY" will process all 500 cells, you don't need that.

    You loop through records of objects, which are on X axis. And for each object you can grab values form the corresponding cells on Y axis.

    For example, if you need to get a value from the second line (Y=1):

    Array.At(loopindex, 1)

    or if you are using "For Each X":

    Array.At(Array.CurX, 1)

  • If there are only tree possible values, then a permutation table is an overkill. Here is a much easier solution:

    | Global number num‎ = 0
    
    + System: Every tick
    -> System: Set num to num=0 ? choose(1,2) : num=1 ? choose(0,2) : choose(0,1)
    -> Text: Append num & " "
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's difficult to understand that garbled code.

    I would suggest using "For Each X" loop, nor "XY".

    Or use the System For loop:

    System For "x" from 0 to array.width-1
    .. Create object Array.at(loopindex, 2)
    
  • First you push a value (zero for example), then change it to an object using "Set JSON" action. I also suggest storing the string in a variable, then you won't have to duplicate all quotation marks.

    local variable jString = {"instance_iid":9, ...}
    
    JSON Push back 0 to ".workstations"
    JSON Set ".workstations." & (JSON.ArraySize(".workstations")-1) to jString