podpathos's Forum Posts

  • here is capx

  • use array to store radnom sequence in array (w5,h2), to store keys pressed, and to compare them

    gvar - npress

    on (sommething)

       +for "i" from 0 to 4 => set at x: loopindex, value round(radndom(1,6))

    npress not=5

       + key "1" pressed => set at XY: (npress,2), value: 1

                             add 1 to npress

       + key "2" pressed => set at XY: (npress,2), value: 2

                             add 1 to npress

    ...

    npress=5

       + compare at x,y - (comapre random sequence and key stored in array) = > do something...

        reset radnom sequence...

        set npress to 0

    I know it's quick and ugly but it may give you general direction...

  • this is one way to do it

  • try this

    edit: move with arrows

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • try this

  • here's another solution which counts line segments (not "infinite" lines)so line segments intersect not only because they are not parallel..

    line-line intersection

    edit: drag line end points

  • be more specific, which types of object intersects: line/line, line/circle, circle/circle, line/convex polygon intersection...

  • scirra.com/construct2/releases

    download topmost - Construct 2 r105

  • look at capx from my second post http://db.tt/YhpwdOYM - there you can use collision detection, sprite (on left/begining and right/end of group)are at same x position, and via 'global varariable' they move perfectly

  • I can't figure out why, it seams that in same event C2 can't apply action to all instaces via pick all. But here is second soulution for your problem, this time with checking for collision http://db.tt/YhpwdOYM

    edit: maybe Ashley can answer your question

  • try this

  • use overlaping at offset and it will work. I have set it to X:4 and X:-4 so that it works at high speed, but you can set it to2 or 1...

    capx

  • glad to be of help

    yes you can drag one event under antoher and slightly move it to the right so it becomes sub-event of that above it...don't move contitions in events move entire event - couple of pixels on left edge of event that you wont to move

  • if you wanna to count instances of "one sprite object" then it's possible, but if you wanna to count all sprite objects/not instances an their instances then it cant be done in one shoot. Family count dont work in CC. I sugest method in my first post if family count don't work in C2, or you get number of each sprite instance and add that to instance count of all other sprite objects

  • I don't have C2 licence so I can't tell you that it's posible to put your sprites in family and then set Text to "Family.Number.of.Object" like in CC - in CC that option you can call but it's not working like meany things in CC.

    If that's not possible in C2 you can set text to 'objectcount'(from system) (all object that ara on layout and exclude those that are not sprite and counts as those that are on layot even if not visible. Some of these are:

    text, particle, tilebackground,canvas, array, ok button, dictionary, fuction...

    find out the rest that you use in your project and for total number of object substracte each of them

    'objectcount'- number of object that are on layout (visible or not)and not sprites = number of sprites

    that's all I can think of