AllanR's Recent Forum Activity

  • therock24 see this thread from yesterday... (it works for both mouse and touch)

    https://www.scirra.com/forum/how-do-i-use-swipes-to-move-an-object_t152773

  • artbava no, you should remove the custom movement (I forgot to). The second version uses Physics to move the ball, and physics slows down the ball using friction and linear damping, so there is no need to manually decelerate the ball.

    the elasticity sets how bouncy the ball is. Linear Damping should be the main way to slow the ball down - I had it at 0.2 to keep it moving a long time. Try something like 0.9 to slow it down at a faster rate (and/or apply less acceleration to the ball).

  • I see mindfaQ beat me to it... but maybe you missed the manual entry for Arrays

    https://www.scirra.com/manual/108/array

    You can use POP, and Push to shift values left or right, Insert or Delete, Reverse, Sort, lots of good things to do just what you want.

  • TMAJA using Left would require knowing how many characters to the left of the decimal you have (which may work fine if you are just working with the alphabet or know you will only have one digit names). If your string objects potentially have names longer than one digit, then you could use TokenAt

    eg: global variable = TokenAt(string,0,".")

  • Try Construct 3

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

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

    Like C-7 said, you should separate the showing of pages from the waiting for input...

    I made a quick test: http://www.rieperts.com/games/forum/ChangePage.capx

    But, I would seriously think about creating your pages as you need them, rather than pre-building them in the editor. 50+ pages is a lot of layers to manage, and if you want to change the general look, you will have a big job on your hands!

  • vijayrajesh that example does not use Touch, mouse only. Touch gets a little tricky because there is no Left and Right button or middle Scroll Wheel. I was working on a multi touch interface last month, and would want to track each touch point to make a proper touch paint program...

    but for now I quickly adapted the capx above for touch. You can't change the size of the brush. The second touch point becomes an eraser... It wouldn't be hard to make a proper tool palette to change brush size, color, etc.

    http://www.rieperts.com/games/forum/CanvasPainterTouch.capx

    The Canvas plugin does have various ways to draw curves - so getting smoother lines would be possible.

  • Toddler

    you need to "Add" a key to the dictionary before you can use "Set" to update that key's value to something else...

  • vijayrajesh

    well, I am sure that level of smoothness could be matched with some effort... The name of it (CurveTo) implies that it is calculating curves between mouse positions. My example below just draws from position to position, so it is not as smooth.

    This paint program was started by my son - he wanted to make a game where you draw your own weapon. I cut out the weapon parts (he had templates to trace and standard parts you could drop in, and then let you try it out).

    I made it draw in a random color, and added a small random amount to the line thickness to help smooth out the line a little.

    Use the scroll wheel to increase or decrease the pen thickness. The right mouse button erases, the left draws.

    (This requires ROJOhounds Canvas plugin).

    http://www.rieperts.com/games/forum/CanvasPainter.capx

  • artbava I added Physics to the ball and objects (that was the easiest way to make the ball bounce off of things). You can download the capx from the link above again to get the updated version.

    Blue objects can not move at all, green objects are dense and don't move much. Yellow objects are light and move easily...

    You will need to add Physics to any objects in your game that you want the ball to interact with. Since you are doing top-down, World Gravity needs to be 0. Your objects don't need the solid behavior (just Physics). Update objects Density, Linear Dampening, or other properties to make the ball interact the way you want...

    It runs well on my iPhone.

  • BlueStarbie you have the sprites on the BG layer instead of the Grounds layer... move them to the same layer as the Player1Box and it works.

    you might want to use the pin behavior, and you might want to think about using 1 event sheet for all the game levels so you don't have to duplicate code...

  • I did almost the same thing as blackhornet, but without the local variable, and used MOD (%) to see if score is at a multiple of 25... (MOD calculates the remainder of dividing score by 25. If there is no remainder then you know you have a multiple of 25.)

    I also moved updating Milestone to where the Score is increased (like blackhornet did), so that you don't have to worry about Trigger Once, and don't have code running every tick that doesn't need to run.

    http://www.rieperts.com/games/forum/Clickhah.capx

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 10-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

19/44
How to earn trophies