AllanR's Forum Posts

  • it could be that your functions are doing more than you think they are.

    functions do not know what instances were picked when the function was called, and will therefore apply to all instances, unless you re-pick instances inside the function - which can add a lot of overhead if you have a lot of instances and/or are picking based on time consuming factors.

    if you are passing in a UID of an instance, and just running actions on that one instance, then I would not expect any difference in performance by using a function.

  • Set text is an action, so if you are looking for it under the "add event" dialog, you wont find it there.

    it is under the Text section of the "add action" dialog.

  • it takes a while for the path to be found, so you can't tell it to follow the path when there isn't one yet.

    You need to tell the enemy to move along path when the On Path Found trigger happens.

  • nice job so far! I like the trails and animations.

    Looks like a fun concept.

  • you can use ABS() to get the absolute value, or use Distance(x1,y1,x2,y2)

  • if you are just playing around and making a game for yourself, then you wouldn't have a problem. But if you are making a game that others can play then, yes, you will have a problem - make your own monsters.

  • ok, here is a quick sample...

    if the equation is wrong the answer is always 42. if you click it, the bubble turns red. if the equation is correct the bubble disappears.

    the sprite font only has + and -

    and the random distribution of correct / wrong answers isn't very good, but it should get you started.

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

  • it would be better to use a sprite font, or even images of the digits to combine into the equations... I am doing a quick sample to show how I might do it...

  • the problem is that event 2 checks if the switch is on, if so then turn it off.

    then event 3 checks if it is off and then turns it right back on.

    event 3 should be an Else statement so it will only run if event 2 is false.

  • Very nicely done! Graphics look great, the arrow mechanic works very well. Took me a minute or two to figure out to match the color or the arrow to the bad guys.

    good job!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rather than use global variables, first set up a family for Nomes (makes checking if one instance is overlapping another instance much easier to handle). Then add instance variables to the family, so each Nomes object can store its own StartX and StartY

  • rafaeltrigo

    Well, that got rather complicated! I cleaned up my code a fair bit, but it is probably difficult to follow...

    It will find the best move and show it after a delay of 3 seconds. It now weights the moves to favour ones lower down the board - because that gives a better chance of starting a chain reaction.

    The animation on the hint isn't nearly as nice as in candy crush, but that would take a lot more work!

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

  • 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

  • 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).