R0J0hound's Recent Forum Activity

  • Events provide the most flexibility. JavaScript would be faster but is more quirky integrating with other construct features.

    Personally I have no interest in making plugins and the maintenance they require. Also they are inherently more limited by what features are provided.

    On face value it would make sense to tie this to the physics behavior but in practice it would be better to make something completely independent.

  • The cursor is set with the css cursor style. Probably it’s only set for the canvas element with that mouse action. So I think you’d either have to set the cursor for each html element or there may be a way to set the cursor for the whole page for every element. Although I’m not sure.

    developer.mozilla.org/en-US/docs/Web/CSS/cursor

  • If you setup the variables with different values, sure.

  • for each sprite3

    pick sprite2 instance loopindex

    pick sprite1 instance sprite2.animationFrame

    -- sprite3: set frame to Sprite1.AnimationFrame

  • That link really doesn't have any info how to do it. Most it says is the points only move along their radius line, but nothing else on how to make it match agario. The link to code is broken. It looks slightly different. Maybe the secret is to do a full on collision response between points and edges, so maybe another day.

    dropbox.com/s/ek59bdqrq71579v/blob_squish3.c3p

  • The end result is pretty much the same for either shuffle. I'm always on the look for a simpler way to do it.

    You can do that rearranging with just text like so:

    listA = "DCAB"
    listB = "3142"
    listC = ""
    
    start of layout
    repeat 4 times
    -- add mid(listA, find(listB, str(loopindex+1)), 1) to listC

    To do it with picking sprites it would be tedious. You can convert a row of sprites to text with:

    list = ""
    
    start of layout
    sprite: group=0
    for each sprite ordered by sprite.x
    -- add str(sprite.animationFrame) to list

    or you can use one of these in the add to list action if you want named frames

    mid("ABCD", sprite.animationFrame, 1)

    mid("1234", sprite.animationFrame, 1)

  • One idea is to check the points one the edges of the circles and move them out of other circles. It's not exactly the same but gives a blob like quality to the objects.

    Circles are done by using a distort mesh with a square.

    dropbox.com/s/5w7z6s6vmio4ztr/blob_squish2.c3p

  • I really don't understand. It seems to be the same as what the last capx does. I used the digits 0123 instead of ABCD mainly as a simplification. You can set the frame images to whatever.

    Anyways I had another idea on how to do the shuffling. Might me useful.

    Basically a1, a2 and a3 are the three answers. a1 is the correct one. ansIndex is a number 0-2 that offsets the order of the answers. The final step is to display the three answers by converting ABCD to 0123 to set the frames.

    Events 1-7 is enough to generate the answers. You can use any other solution to display them after that.

    dropbox.com/s/fusumitrtn0q3ya/shuffle_combinations2.capx

  • I fixed that issue so redownload. It should always show the answer sequence now.

    I don’t understand the first part of your question though.

    Best I understand you have want three four digit answers. One you can specify and the other two are shuffled versions of that.

    I had the digits start at 0 instead of 1, but all the numbers will be shuffled versions of 0123.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The second example does that. You specify the sequence in the global variable and it’s placed in one of the three groups of three.

  • To do what you want you mainly have to just rearrange the events you used in your original post:

    for each good
    bad: pick closest to good.x, good.y
    -- distance(good.x, good.y, bad.x, bad.y) < 200
    -- -- good: move toward bad
    -- else
    -- -- good: shoot toward bad

    But like the others suggested it can be good to put a bit more thought into the targeting. For example below I had each bad can be targeted by one good at a time, but that was mainly to prevent the good objects from overlapping over time.

    dropbox.com/s/a9a075lrxu45yjx/targeting_closest.capx