dop2000's Forum Posts

  • You need to download the addon and then add it in the Addon Manager.

    construct.net/en/make-games/addons/84/greenworks

  • Have you seen the included examples in Construct?

    segmented-boss-fight

    skeleton-hierarchy

  • Organizing events like the first screenshot makes it easier to read the code.

    There may be different actions you want to run in each sub-event.

    Also, you will need to use sub-events if there is an OR-block:

    Condition1
    
    ... Condition 2
    ... OR Condition 3
    
    ........Condition 4
    
  • itemExists in my screenshot is a function. It checks all list items in a loop and returns 1 (true) if the specified item exists. Otherwise by default it returns 0 (false).

    So you can use it in conditions and expressions to check if the list contains an item.

    construct.net/en/make-games/manuals/construct-3/project-primitives/events/functions

  • Local variables inside events is something I was unaware was necessary, nor did the tutorial I was using mention this. The JSON path is also straight from the tutorial, so I am doubly annoyed that it's wrong there too.

    In this case the local variable needs to be inside the function, otherwise two functions will be changing it and the result may be incorrect.

    Also I think (Variable-1) as a return result is wrong, it needs to be just Variable.

    By the way, you can use JSON.ArraySize("Scene") expression instead of those functions. This will return the number of records in the "Scene" array in JSON.

    Same for the number of dialogues:

    JSON.ArraySize("Scene."& curScene & ".Dialogue")

    Layer names in the events were always red, so I went with numbers since the software itself says you can use them- is that not the case?

    Layer name as any other strings in events needs to be in double quotation marks:

    Set layer "Dialogue" visible

    If you decide to add a new layer tomorrow, you will have to update layer numbers throughout your code. With layer names you won't have this problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is nothing stopping you from using family I believe.

    Except that families are not available in free version of Construct.

  • There are so many mistakes, I managed to get it working, but just barely..

    1. Events 9 1nd 13 and local variables need to be inside the functions as sub-events, not outside.

    2. You are composing JSON path wrong.

    "Scene"& curScene & "Dialogue" will result in "Scene0Dialogue", which is an invalid path.

    Check out this project, it shows paths to all values and keys in JSON:

    dropbox.com/s/srgf9lme08by9wa/JSON-RecursiveRead.c3p

    Besides, you spell key names differently in every event! In one event it's "dialogues", in another "Dialogue". Double-check the spelling in all events. And JSON keys are case-sensitive!

    3. Parallax on the dialogue layer should be 0x0

    Also use layer names in events, not numbers.

  • I think an array is an overkill here. You can make a function:

  • Think I'll try this developers.google.com/games/services/common/concepts/leaderboards

    I believe this is for Android apps published on Google Play only.

    If you are making a web game or a multi-platform app, you need to look at other services like PlayFab or Firebase.

  • It pauses waits and events like "Every X seconds". It doesn't pause most other events, loops, triggers.

  • Is that screenshot from the array editor in Construct?

    Column names in the array editor are just for convenience, you can't use them in expressions.

    You need to loop through the array on its Y axis, comparing elements at X=0 and X=1 with the instance variables on the sprite:

    For each Sprite
     Repeat Array.height times
     Array.At(0,loopindex) = Sprite.Episode
     Array.At(1,loopindex) = Sprite.Sequence 
     --> Sprite Set animation to Array.At(2,loopindex)
    
  • Yeah, you can use this formula:

    Audio Set volume to log10(volumePercentage/100)*20

    Where volumePercentage is a value between 0 and 100

  • You will need several events:

    On Q Key Pressed: start a timer, say for 0.5 seconds.

    On Timer: open menu.

    On Q Key Released and if the timer is still running: stop that timer, and switch weapons.

  • You mean the route editor? Its interface may be very simple like: on "A" key pressed create a waypoint sprite under mouse cursor, on "D" key destroy a waypoint sprite under mouse cursor. And the sprites have drag&drop behavior, so you can move them.

    Then press a button to export all waypoint sprites to a string of coordinates. The resulting string may look like this, each pair of numbers representing waypoint X and Y:

    100,100;120,200;200,120;300,300

    Or it can be a JSON array:

    [{"x":100,"y":100}, {"x":120,"y":200}, {"x":200,"y":120}, {"x":300,"y":300}]

    Then in your main project you need to parse these strings or split them using tokenat() to extract these coordinates.