AllanR's Recent Forum Activity

  • your data is in JSON format, but like blackhornet said it is not a format that C3 array will understand.

    You can load the LastData from AJAX into a C3 JSON object, and access the data by keys, and if you really wanted loop through that to load into an array.

    to get it directly into an array, you would have to have the script on your server build a C3 compatible JSON file. BlackHornet was suggesting taking an Array from C3 and outputting it as JSON so you can see what it would have to look like.

    here is code that worked fine for me:

    Edit: should have refreshed first! :)

  • you are using Touch - is touching SoundIcon

    that will continuously fire for as long as you are touching the icon - 60 times a second.

    You want Touch - on touched object

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you can add an event to check the type

    under System - Check Value Type

    for value enter your TextInput.Text field, and type Number or String (depending on whether you want to display an error or continue on with what was entered).

  • I can take a look at that, shouldn't be too hard but have to change a couple things in the way it looks for matches (and want to optimize the code a bit).

  • found a couple of bugs... with moving blocks too quickly (starting a tween while one is still running), and suggestions when there are no moves and after an invalid move. I will post an updated version later today, maybe with a few more comments to help explain what is going on as well.

  • I decided to give it a try as well...

    I started with your code, and figured it would be fastest using an array so ended up doing what made sense to me - but haven't put many comments in yet so it might be hard to follow.

    The board can be any size, just change the Columns and Rows global variables and everything else will adapt. I fixed a number of issues - now it wont let you make a move until all other blocks have stopped moving, if you make an invalid move it will reverse it, as long as you hold down on a block you can move it back or another direction (you have to let go to finalize the move), multi touch will only allow one move at a time...

    after a move has completed it makes an array of all possible moves and then sorts them by the number of blocks that will be removed. This will prioritize a move of two sets of 3 over one of 5 in a row. This could be changed by making the scoring work differently, but this is a start... it shows the recommended move as soon as it has calculated it for testing purposes, or you can click the Hint button.

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

  • to sort your array you pretty much will have to convert you words to lower case - using lowercase(text).

    what you could do is make your array 2 dimentional where the y=0 is the lowercase version of the word, and y=1 has the unconverted word.

    Then you can sort the array on the x axis.

    Another thing I have done with very large arrays is use a second array to filter and build a key to sort on (when I had to sort based on more than one field from the main array). the index array had the key in the 0 column, and the line number back to the main array in column 1.

  • take a look at this thread: in the middle of the second page it has a demo of how to draw a path and have an object follow it.

    https://www.construct.net/en/forum/construct-3/general-discussion-7/collection-demo-projects-149701/page-2

  • Awesome tutorial! Nicely done.

  • this is called Picking.

    by default, all instances of an object type will be Picked for an event on the eventsheet (unless a mouse click or some other trigger singles out one instance). There are many ways to filter out or pick smaller groups of an object.

  • Choose adds a random chance into the equation.

    if you want to increase by percent you just have to express the percentage as a decimal, so 0.1 would be 10%, or 0.05 would be 5%.

    multiply the current attack by the decimal to get the amount to add

    PlayerAttack = PlayerAttack + 0.05 x PlayerAttack

    would add 5% more attack to the current value.

  • I tried a bunch of ways to replicate that, and couldn't... seem's like a glitch. I would try updating everything - Chrome, C3, video drivers, etc. reboot and try again.

    if that doesn't resolve it, then try making a small version of your file for others to test to see if we get the same results.

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