AllanR's Recent Forum Activity

  • SkyFallAU

    I don't know how Soul Knight works, but if you want to use random seeds so that people can share a random level they like, then you will need the noisejs plugin for C2. And you will want to read up on perlin noise.

    https://www.construct.net/en/forum/extending-construct-2/addons-29/plugin-noisejs-71474?kws=perlin%2bnoise

  • ayomon

    that game is perfect for the physics plugin - you can give the balls different density and elasticity settings...

    https://www.rieperts.com/games/forum/plinko.capx

  • I am pretty sure it finishes one event completely before it starts the next - unless you add "Wait x seconds" to intentionally delay actions.

    I have heard some people say that triggers can happen out of sequence, but I don't know if that is true or not.

    EDIT: from the manual:

    However, triggers are an exception. See the green arrow to the left of Keyboard: On Space pressed from the previous example:

    Note the trigger.

    This indicates the event is triggered. Rather than running once per tick, this event simply runs (or "fires") upon something actually happening. In this case, the event runs when the user hits the Spacebar key on the keyboard. It is never checked any other time. Since triggers run upon an event happening, they aren't checked in top-to-bottom order like other events. This means the ordering of triggers relative to other events is not important (except relative to other triggers of the same type, since triggers still fire top-to-bottom).

  • jobel

    I think that should work fine. It never occurred to me to try that, but it follows the rules. Eventsheets are executed top to bottom.

    like AySquirrel said, a container would be a good idea because then when you pick the main sprite, the spawned sprite will automatically be picked as well. And when the main sprite is destroyed, the spawned sprite will also be destroyed. (any objects in a container automatically get created when the container object is crteated).

    another way to do it (without containers) is to have TestSprite spawn TestSprite2 inside the first repeat (event 2). That way it will create then in pairs, rather than all the TestSprites first, and then the TestSprite2s afterwards.

  • Alon

    you could use "On frame changed" to take care of the timing, under that take a snapshot of the canvas (and increment the image count variable), then use the browser object to download...

    in looking into the options, I ended up making a working sample... so here it is:

    https://www.rieperts.com/games/forum/snapshots.c3p

  • jobel

    when objects are created, Construct does not finish adding the new objects to the internal lists until the next top level event. So, when the object is created, it will stay picked for all actions and sub events directly under it. But you can't loop through them until the next top level event, or you can add a "Wait 0 seconds" action before the for loop to make that code run at the end of the current tick.

    the only other thing you can do is pass the UID of the object to a function, and pick the object by its UID - then you could modify each object as it is created...

  • WRS

    instead of using the start x and y in the distance calculation, use the Last x and y (and the current x,y). Every time you check the distance traveled, update the Last x and y.

    distance(lastX,lastY,player.x,player.y)

    lastX = player.x

    lastY = player.y

  • Try Construct 3

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

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

    this is how I would do it - with a single tiled background image made to look like multiple objects.

    if you need actual separate objects, it gets a little trickier - you have to wait until the touch/mouse has moved enough to create the next object, and decide what happens if the user doesn't draw in a straight line...

    https://www.rieperts.com/games/forum/DrawLine.capx

  • Taximan

    this is a sample I worked on a few months ago - it uses physics that ROJOhound came up with.

    https://www.rieperts.com/games/forum/waterfloat2.capx

  • jerjamm2

    ok, I have barely started looking, but I can see that the area where you can't click on the "BookMatchPage" is exactly where the "Select" button is on the window that pops up. So, what is happening is that the select button believes that you are clicking it at the same time you are trying to open the window, so it closes it again before you even see it.

    buttons can be clicked on even if they are invisible... but in this case, it is moving the sprite into position (in event 4), and then when it executes event 6, the condition is true so it makes the SelectWrestlerPopup invisible again.

    move event 6 up above event 4, or put a "Wait 0 Seconds" action before you call the popup on event 4.

    (it is the same problem on the other page)

    EDIT: the "Wait 0 Seconds" action tells Construct to execute the actions after the wait at the end of the current tick. Doing this will have event 6 checked before the popup gets moved onto the screen by the delayed event 4.

    EDIT2: I can't make changes to your file since it exceeds the free limits (I use C2). But I am guessing you will have the reverse problem if you move event 6 up above event 4. The Wait 0 Seconds should work, but be aware that when you click the Select button, it will also register the click on the RosterImage2 (although that is immediately reversed by event 6).

    in this case it shouldn't cause trouble, but in other cases it would if clicking on a button made changes you didn't intend to happen... so, you need to think about making buttons active and inactive. There are numerous ways to do that: put the code that gets executed when a button is clicked in a group and make the group active or inactive as needed, or give the buttons an instance variable and check that when they are clicked, or put all buttons in a family, and when there are overlapping buttons use Pick Top to make sure only the button on top gets processed... etc.

    EDIT3: ok, looked a little closer at your code, and I see you effectively do disable the other buttons by checking the popup background image y position...

  • jerjamm2

    there is always a logical explanation - although it can sometimes be very difficult to find! a lot of times a fresh pair of eyes can spot the issue (usually because we have made the same mistake).

    so, it could be an issue with the events, or maybe the collision mask is ok on one frame, but not on another, or one animation works but another doesn't. It also quite often comes down to not having the correct instance "picked".

    it might help to eliminate obsolete code, and then figure out how to upload to dropbox...

  • thenadamgoes

    very similar to what Tyler said...

    https://www.rieperts.com/games/forum/cattest2.c3p

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies