dop2000's Forum Posts

  • You don't need Paster for this. Put player sprite and the light beam sprite on a separate layer, use an effect like Lighten or Additive or something like that. And don't forget to set "Force own texture=Yes" in layer properties.

  • I don't know.. A math schoolbook? :) It's nothing but division and multiplication.

    Say, loopindex is 13. So the location of the button for level 13 will be:

    X offset (13%4)=1, 1*300=300px

    Y offset (13/4)=3.25, int(3.25)=3, 3*200=600px

  • Loopindex is the index of the loop. %4 means the remainder after dividing it by 4. So the result is 0,1,2,3,0,1,2,3,0,1,2,3....

    (loopindex%4)*300 is the X offset for each of four columns, first column will be at x=0, second at X=300 etc.

    int(loopindex/4)*200 is the Y offset for each row. Each row contains 4 records and placed with 200px intervals.

  • It has probably been removed, but I can't find any mention of this in release notes.

    We should ask Ashley

  • Another example:

  • So you want to detect different line configurations, like this?

    Working with arrays in C3 is not an easy task and if you want to check for 20 different line configurations, this will be a huge PITA..

    I would probably do this with sprites and overlapping checks.

    Create a new sprite with all line configurations, each in a separate frame - blue line on my screenshot. Lets call it Detector. Define correct collision polygons, following the line. Then simply place Detector on top of your set of pictures and pick all pictures overlapping it. You can then analyse picked pictures from left to right and check if they form a winning combination.

    Then change Detector frame to the next one, and repeat the whole process for all frames.

    Make sure collision polygons for pictures are not very big, otherwise diagonal lines may overlap wrong pictures.

  • Here is a demo showing how to dynamically create a scrollable list with buttons, images etc. Choose the one with multiple columns. It's vertical, but you should be able to change it to horizontal.

    howtoconstructdemos.com/scrolling-a-list-of-players-scores-images-etc-example-a-capx

  • To add to Allan's comment, you can click Crop button on the toolbar and the 1px transparent border will be added to your sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can also add all x/y coordinates into one array.

    You will just have to read values back in pairs. I couldn't find the way to add 2D-array to JSON.

  • No, you can't do this in object properties. You have to do it with "On every tick" event.

  • If you want it to shoot only once when left button is clicked - use "On clicked" event.

    If you need to continue shooting while the left button is pressed, you can do this:

    variable LastShot=0
    
    Mouse Left button is down
    LastShot<(time-0.5)
    	Player spawn Projectile
    	Set LastShot to time
    

    This will add 0.5s delay between shots.

  • matrixreal Thanks, it may be a good idea! PMs are disabled on this forum, can you give your email?

  • Did you restart Construct? You need to do this after adding new addons.

    Also, if an addon only supports C2 runtime and your project is using C3 runtime, it will not show up.

  • The links to addons are in the first part of the tutorial. Also, googling always helps.

  • If you don't need very realistic physics, you can fake it:

    dropbox.com/s/m1g65u76qrw7ean/BirdOnWire.c3p