Nilom's Forum Posts

  • You should have one function doing what you want and use function parameters if you want alternations of that function.

    Imagine you have 3 different versions of the same function on 3 event sheets and then you need to change huge portions of that function. Than you have to do every change 3 times instead of just one time. Also it can get messy if you forget to update some of these functions to the newest changes.

    I would probably use a Boolean function parameter so that you can easily enable or disable additional function behavior.

  • Why would you want to do that? I can call my functions from other event sheets. In fact I have a whole event sheet just for functions and call them from my main event sheet.

  • You could use "wait for signal xxx" on b and at the end of a you give the "signal xxx".

    But I would probably avoid running too many events zigzag from different layouts. If you can avoid it.

  • It's up to you how you organize your data in table format. Pages may represent a parent object in JSON. (shops in my example above) I also often try to split big arrays into multiple pages, simply because it's easier to read and edit than one huge wall of numbers.

    Okay great. I think I already know how I'm going to structure it.

    And of course not all JSONs can be done this way, I have a few plain-text JSON files in my project as well.

    Yeah I have that as well. But I think for database-like it is better to use actual tables.

  • oosyrag Interesting. I will look into Google Forms (I guess that's what it's called?).

    dop2000 Cool. Thank you very much for the example. So depth translates to the different pages? When I copy data from Google Sheets, can I just copy the whole page?

    I also found this. That is a script that can export JSON from Google Sheets.

  • Hello there!

    I'm wondering what the most practical way to add and edit card data would be.

    Of course ingame I will be storing all the data in a JSON object. But I think it is very error prone and slow, due to formatting, to manually write hundreds of JSON entries into a JSON file.

    Additionally I really like being able to write down new card ideas on my phone on the go.

    So Google Sheets comes to my mind. Is there another good way to do this?

  • Ahhhh! Now I got it.

    I tried it with action set variable but I did it wrong:

    find(usage, "/") > 0 ? filter_mode="match" : filter_mode="contains"

    Thank you!

  • Hey there!

    Why doesn't the following evaluate expression work?

    "find(usage, "/") > 0" returns 1 in console log. And 1 should be "true" right?

    This does not trigger. There is no browser log shown:

    Can't I set variables inside this conditional operator?

    What am I doing wrong here?

    Edit: I added the parentheses just for testing purposes. Originally I had

    find(usage, "/") > 0 ? filter_mode="match" : filter_mode="contains"

    which didn't work either.

  • If it is for personal use only you can just use the browser plugin. If you want to sell it you should use an online databank.

    But I assume that you use it personal.

    On start of layout set the following variables:

    current_month = mid((Browser.ExecJS("Date()")),4,3)
    current_day = mid((Browser.ExecJS("Date()")),8,2)
    current_year = mid((Browser.ExecJS("Date()")),11,4)

    Save the door numbers in a variable door_number inside the door sprites.

    Then on door sprite creation check the local storage to find if there is the door_number safed as open. If so show an open door instead.

    On door sprite clicked compare two values:

    current_year = 2022
    current_month = "Dec"
    current_day >= sprite.door_number
    	-> do stuff and safe to local storage that you opened the door
  • Does anyone have an idea? <3

  • My first guess is that the engine does not know which InvSlot you are comparing because there was no overlap. You should use "for each -> InvSlot" and then have your check.

  • Did you try when the building is overlapping the player change building opacity with trigger once?

  • Hello!

    My buttons consist of two DrawingCanvas objects. One is in the background and is the border and the other one is the button. The border is the child of the button.

    But when the window size is altered then the border position will be messed. The button starts jumping inside its border. I uploaded a GIF, not sure if you can see what I mean.

    media.giphy.com/media/1uA14955v1LfAMwdJo/giphy.gif

    Depening on the current window size sometimes the button border will be 1 or more pixels smaller on one or two sides or sometimes completely gone on one or two sides.

    Here are some pictures because the GIF turned out very low quality:

    The fullscreen mode is letterbox scale. I tried all the other modes as well. I also tried pixel rounding or rounding the canvas objects positions on creation. With no avail.

    What can I do to let these two objects always pixel-perfectly maintain the exact same position relative to another?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In the second line the JSON path is wrong. The correct JSON path to set should be ".payload.qr_data".

  • Why should I even bother then?

    It is time consuming to write an elaborate review that has a high quality standard.

    I do not see a time stamp this was posted. Maybe it was 20 hours ago. Then most likely it already has 300 or more reviews. Even if it was posted just 30 minutes ago maybe my review takes longer to write because 105 people before me just write a 3 liner to be qualified.

    It would have been smarter if you chose 105 winners from all the reviews. That way you woulde have got way more than ~105 reviews.

    But perhaps it's just my opinion.