oosyrag's Forum Posts

  • 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/scl/fi/q4fiywarw78tkkxsyetsn/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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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-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.

  • 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.

  • I think /n is a newline rather than a trailing space. If it doesn't show up in the array editor, I'd say that's worth a bug report to fix.

  • That's exactly what you want. Imagine each tilemap is a sheet of paper. Transparencies are holes. You'll need 2 sheets of paper if you want to see them through each other, otherwise you'll just be seeing the table.

    You actually don't need layers, you can have both tilemap instances on the same layer. But layers give you some organizational tools.

  • One other way I've used to get the coordinates of a collision for round objects is to cast a los ray on collision, and use the hitx and hity expressions.

    If all you need is side though, helper sprites would probably be best.