oosyrag's Forum Posts

  • I would generally recommend against having labels for rows/columns within an array. There are many reasons for this, but the main one is that much easier to work with an array that contains one data type as opposed to multiple.

    I would use a second 1d array as an index, with the location/label data. It would work especially well in this case if your labels are the same on both the x and y axes.

    You can use the array.indexof() expression to get the index of any given value, but this only works on the first (x) axis of the array.

  • You do not have permission to view this post

  • Use individual objects for each letter.

  • Whenever you change the tile, record the x and y tile position in variables.

  • A curve drawn with lines is smoother than you think. It's just a matter of resolution.

    dropbox.com/s/9a76a3nx6od06nr/drawtracerexample.c3p

    Edit: If you don't want to use drawing canvas, using a sprite object as a line connecting the current position to the last position will work mostly the same. Use distance(x,y,lx,ly) to set the width, and angle(x,y,lx,ly) to get the angle.

  • A grid is simply rounding all coordinate inputs to the nearest grid position.

    So if your grid size was 1 pixel by 1 pixel, you would round all numbers to the nearest whole number.

    If your grid size is 32, you would divide by 32, round, then multiply by 32 again. gridx=round(x/32)*32.

  • Looks like you found a bug. If you can reproduce it in a minimal project, the team would probably appreciate you putting a bug report together. github.com/Scirra/Construct-3-bugs/issues

  • Using a second array to temporarily hold values is a pretty straightforward, standard sorting technique.

    Alternatively, you can use a while loop, looking for array.indexof(0) to find 0, and delete that index. Keep track of how many 0s get deleted until there are none left, and push back that many times.

    Efficiency wise, you probably don't have to worry about it unless you're experiencing noticeable slowdowns.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • You do not have permission to view this post

  • If you use inclusive solid filtering mode on your player sprite on the wall, it will only treat walls as solid, and nothing else. Your player shouldn't need any filtering.

  • What's a double unit?

    If you want to prevent two units spawning on the same side consecutively, just alternate between the lanes instead of choosing left or right randomly.

    In general though, you can record where the last unit spawned in an instance variable. Check against that instance variable to make sure the next unit doesn't spawn there, then update it.

  • I highly recommend using the timer behavior for cooldowns.

    On space pressed and

    If timer is not running -> do thing, start timer.

    You can also stop/interrupt the timer with another trigger if you want as well.

  • The set solid collision filter is an action associated with the player object, not the door, so picking the door has no effect on this action.

    I don't think this collision filtering is the best fit here. First thing that comes to mind would just be to enable and disable the solid behavior for the door that is being overlapped.

  • Your question is mostly incomprehensible to be, but try taking your two objects and effects and pasting them to a drawing canvas to combine into a single object.