dop2000's Forum Posts

  • CloudDealer Please see the link I posted, you need to properly load JSON into the array.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First, if you haven't done this yet, you need to load the array json file into the Items array object using AJAX. See the first two events in this template for an example: editor.construct.net

    Custom column and row names in the Array Editor are just for your convenience, you can't use these names to access data. So you will need to use numbers for x and y index - Items.at(0,4)

    If your table is big it will be difficult to remember what all those row numbers mean. You can create a bunch of constant variables and use them to make your code more readable:

    ITEMNAME_ROW=1
    HEALTH_ROW=2
    ARMOR_ROW=3
    EQUIP_ROW=4
    INSPECT_ROW=5
    
    Set Description to Item.at(0, INSPECT_ROW)
    
  • XHXIAIEIN These links are amazing, thank you! Yeah, that video tutorial definitely explained one of these algorithms, it doesn't matter which one now :)

  • Again, you need to post a screenshot of your code or your project file. It's a guessing game without it.

  • R0J0hound Thanks, your example is what I need! Although I have a feeling they used the Wave Function Collapse in that video... Maybe I'm wrong.

    oosyrag Interesting method, but a bit over complicated. And as I understand, it may create impossible configurations, which means it will need to be repeated until a good solution is found.

  • You should post your code.

    Normally if you need to process a 2D array you can do "Array For Each XY" loop, but I prefer using two nested System For loops. If your characters are on X axis in the array and their stats are on Y axis, it may look like this:

    System For "char" from 0 to array.width-1
     System For "stat" from 0 to array.height-1
     ... array Set At (x=loopindex("char"), y=loopindex("stat")) value int(random(1,10))
    
  • If you don't receive any response from AJAX, check error messages in browser console log (F12)

  • I don't understand, do you receive "1" from AJAX or not?

    Try changing the "last" variable to string type, or use int(AJAX.LastData) to convert "1" string to number.

    If you don't receive any response from AJAX, check error messages in browser console log (F12)

  • I almost never use Pin now, hierarchy works much better imo.

    im_pro_viz You need to add this object to a family. Then you can pick one instance of the family and one instance of the object and add them to the hierarchy.

  • I remember watching a simple youtube tutorial (not specific to Construct), explaining how to randomly generate dungeons like this, where there is a guaranteed route through all rooms from start to finish.

    Basically, the algorithm determined how many passages/doors will be in each room and where they will be located.

    Unfortunately, I lost that video.

    Does anyone have a link to that tutorial or know the algorithm to generate such levels?

  • Use a separate event -

    Sprite On Created : Sprite set animation...

  • What do you mean by backtrack?

    If it's just one continuous level, you can put large invisible sprites for each section. As player enters a new section - move the camera there. This will allow to go forward and back.

    Check out some examples here:

    howtoconstructdemos.com/camera-two-examples-of-scrolling-limited-to-a-certain-zone-capx-capx

  • Create an invisible "Camera" sprite, add ScrollTo and MoveTo behaviors to it. When one screen/section is finished - move the Camera sprite using MoveTo behavior to the new section. It will speed up and slow down nicely.

  • Have you seen the official template? You can also search the tutorials section.

  • The console log mentions a missing keystore file, did you specify it? Are you able to export an unsigned apk?