AllanR's Recent Forum Activity

  • the event sheet runs 60 times a second, so trying to slow down the execution of a function with a while loop probably will not work.

    dop2000's repeat loop works because it adds a series of ever increasing waits. but the function itself finishes in one tick.

    is there a reason you don't want to use the Fade behavior, and the On fade finished trigger?

  • for the second mechanic - you say you want the ball to move at the speed of the swipe. but what happens if the swipe slows to a stop, or reverses direction? does the ball move if it is already on the top and the player swipes up again? what happens if the player tries to swipe with two fingers and one swipes down and the other swipes up? what's the point of moving the ball to the other side? you mentioned reversing gravity - is the ball supposed to be movable in any other way?

  • give this a try...

    it uses the Platform behavior, sets the Platform angle of gravity to the center of the circle. Default controls are turned off so that we can lock the player's position by ignoring left and right movement. Jumping is a little tricky because it is really hard to have a player on a round object - you can't get the collision mask smooth enough for it to think it is always on the ground as it moves over the surface (or as the surface moves under it in this case). So, I use a second circle object that is a little bigger, and if the player is overlapping that when the up arrow is pressed (or a tap gesture) then do a jump.

    just for fun I added a button to toggle fixing the player in one spot. When not fixed, the player can run around the planet - gravity is constantly being set to the middle, so he wont fall off.

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

    EDIT: just added an obstacle to jump over, and a detector to tell us if we successfully jumped over the obstacle.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just posted a bug report, because Ashley gets tagged in millions of posts and may never see this...

    https://github.com/Scirra/Construct-3-bugs/issues/3379

  • are you still using html buttons, or did you switch to making buttons from sprites and text objects?

    html buttons are not part of the canvas, and getting rid of the lag is pretty complicated. ROJOhound found a solution a year or so ago, but I would have to do some searching to find it.

    if you are using sprites/text, then everything must be pinned to the same moving object. If you have a panel that slides in, and buttons pinned to that, and text pinned to the buttons, then the text will lag behind. The text should also be pinned to the panel.

    make a small test file with sample buttons so we can see what is going on.

  • event 56 is a trigger and shouldn't be a sub-event. when the animation finishes the other conditions aren't true so it doesn't get to the sub-event.

    move event 56 out to the top level and it should work the way you want.

    since you are playing the default animation, that animation will start playing at the start of the layout (which may be why you moved it to be a sub-event). So, to stop the trigger from happening when you don't want it to, you can stop the animation at the "On start of layout"

    or add another condition to the trigger where you compare two values:

    system - Compare TimeScale = 0

    or use your Pause_Button variable as another condition to the animation finished trigger:

    system - pause_button = 1

  • web storage has been phased out, and replaced by Local Storage.

    So, all you need is Local Storage to save a local high score.

    if you want a global leader board, then you have to set up your own server database, or use some other service...

  • I just went all the way back to when the new functions were released in R143 - and the picking worked from that release all the way to R166.

    starting in R167 it now has reverted back to how it worked with the old functions.

    a C2 project that uses the old functions opened with releases R143 to R166 still work the old way, but if you convert to the new buit-in functions starts working the new way.

  • OKAY!! so, I am not totally crazy!

    I had two versions of C3 open, and happened to open your sample in R164.3 (the latest stable). It does indeed work the way you said,

    but I just opened it in R168, and it does not work - works the way I said. (adding the wait 0 then makes it do what you want).

    so, I went back to your original file (problem.c3p), opened it in the stable version and divided your function into two and it started working, but it also does not in R168. (haven't tried other versions). So, we have uncovered a bug (or at least a change) in C3...

    do you want to file a bug report with your last sample? it works one way in R164.3 and another way in R168.

    the way it works (or doesn't) in R168 is the historical way I understand picking. the way it works in R164.3 is an improvement - although I find it strange that it works with consecutive function calls, but not when one function calls the second.

    EDIT: just checked other versions - it worked up until R166, stopped working at R167.

  • Wow! you are right!

    it might have something to do with the new functions... I need to run some more tests to make sure I know whats going on.

    thanks for the file - and for humouring me! :)

  • I'm guessing you didn't take a look at the example I posted (based on your file).

    I do it the way you say should work - and it doesn't, until you add a wait. Try it - click the no wait button, then click the clear button, then click the wait button.

    in the pseudo code you posted, the "On Start Of Layout" is the top level event. Any objects created by actions under it will not be pickable until all the actions in that event are complete and the next top level event starts. The functions don't count as top level events because they are called from the same "on Start of Layout" event. However, having two "On Start of Layout" events would work:

    on Start of Layout - createLevel

    on Start of Layout - loadEnemies

    post a sample showing me that I am wrong. I don't think you can - I have seen this issue cause a lot of trouble, so fully understanding how objects are created and how the eventsheet works is really important.

  • I saved it in the last stable... so try this:

    https://www.rieperts.com/games/forum/wingman.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