AllanR's Forum Posts

  • I have seen that before - I think the fix is to put a one pixel transparent boarder around the edges of the images. You can automatically do that in the C3 image editor by clicking crop button.

  • Here is a sample of what I do. It might not seem very obvious at first, but a lot has to happen in the correct order to handle multi-touch and over-lapping buttons and windows.

    the way you are using global variables may not work the way you expect if there is more than one active touch going on...

    I use a Family called SpriteButtons that has family instance variables to describe what each button does. When I have over-lapping windows/menus, I use a family member that is not Type "Button" to act as a shield to make buttons under it not accessible.

    in this sample there are three buttons, the Home button changes the background colour. The Pause button disables/re-enables the Home and Settings buttons. The Settings button calls up a dialog that mostly covers the three buttons so you can see how the buttons below get blocked, except for the parts not covered. The dialog box can be dragged around and has a close button.

    To make a button do something, you click on it. But if you change your mind and slide the mouse (or touch) off the button, then nothing will happen. If you touch someplace not over a button and slide the touch onto a button, nothing will happen. Or if you click on one button and slide to another button, nothing will happen.

    if you click and hold down a button, but then another touch disables that button, the first button will not activate when you let go. You can't have two touches trying to use the same button... and plenty of other weird multi-touch scenarios you might not expect but your users will accidentally do.

    Each button has an instance variable that tells what function should be called when it is clicked. So, to add new buttons, all you have to do is add the sprite to the SpriteButtons family, and create a function for what you want the button to do. You don't have to change any of the core Touch Start/Is in touch/Touch End code. (Buttons need Up, Hover, Down, and Disabled animations)

    This is the first time I have done this in C3. In C2 it is easy to call a function from text in an instance variable - in C3 you have to remember to set up a mapping for that unless I am missing something... I also think I have found a multi-touch bug in C3 - a new Touch that hasn't moved at all seems to sometimes prevent other touches from updating properly. I will test that out a little more to make sure it isn't my fault and may submit a bug report.

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

  • all sprite instances share the same image data.

    if you want to load different images for each instance, then you need to load each image into a different animation frame and then set each instance to the appropriate animation frame.

  • there are plenty examples in the forums, but searching for them can be tricky...

    I did an Angry Birds demo years that draws a line the bird will follow:

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

  • I downloaded it from my site and it opened fine...

    I made it in the R189.2 stable version - what version are you using?

  • here is a quick sample:

    https://rieperts.com/games/forum/AppleTree.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • if you don't care which apple gets destroyed you could use System - Pick a Random Instance, and then destroy that one.

    If you give them bullet behavior (turned off by default), then you could activate it and have the apple "fall" out of the tree.

  • Tick Count is just a count of how many ticks have past since your game started. It has nothing to do with performance, so there is nothing wrong with that.

    If you are only getting 11 fps and 90% cpu, then you must have a lot going on - effects or behaviours, collision checks, huge images, faulty logic in your events, etc...

    we would have to see your capx to know more.

  • could be just about anything... without seeing your code.

    could be that the layer you are moving it to is scrolled or zoomed differently so that the sprite is not visible. And if you have code that destroys objects not on screen, that could cause it to be destroyed.

    I have never heard of anyone having issues like this, so it is likely a bug in your code, or a new issue from the most recent update. if all else fails, you may have to file a bug report... but I have a feeling it is some combination of actions in your code.

  • I would file a bug report, following all the guide lines so they can check it out properly.

  • Probably the easiest way, based on your screen shot, would be to add another variable called StopTimer, and set its value to 0.

    then when the correct answer is given, set StopTimer to 1.

    then change the two "Every Tick" events to a System - Compare variable - StopTimer = 0

    that way the actions that update the timer variable will only run if StopTimer is 0.

  • There were a number of minor problems...

    your sprite font should be 16x16 (not 20x20)

    the animation speed for Cadenas was not 0, so it was playing the whole animation. You want it to stay at the frame you assign, so it should be 0.

    You want to unlock levels Less than or equal to Niveau

    In VerificationReponse, you want to check if every piece in the puzzle is set to the correct colour, so you need a for each Element loop, and if the number that are correct matches the total number of Element, then show Victoire and go back to the menu.

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

    oh, I added a TextInput box in the top right corner that shows what each piece is set to for debugging... so I would know what to set each piece to :)

    Edit: the family instance variable was being set correctly. It was how you were checking if the puzzle was complete that was the problem.

  • tried it again! this time was a lot easier because you start with more money. after a few days, everything was fully upgraded. Then all I had to do was quickly put down 8 turrets and the aliens never got close. That cost 400 per day, but since you make about 640 per day that wasn't a problem.

    I stopped playing after 40 days... had over $10,000.

    One possible bug I saw was when a turret took some damage - all of them started smoking.

    it would be awesome to have more upgrades available, and maybe a boss level every several days...

    Anyway, excellent job! :)

  • all instances of a sprite share the same image data (that is why they all look the same with the last image loaded), so if you want to load different images for each instance you need to load each image into a separate animation frame, and then set the frame for each new instance.

  • very nice! :) I only made it to day 3... the graphics look great.