dop2000's Forum Posts

  • Is the gun always pointing horizontally (not rotating to mouse position)? Then you can simply do this:

    Aim set angle to (-recoil)

    Or when the sprite is mirrored:

    Aim set angle to (180+recoil)

  • There may be an easier way. You can add a border around the edges of the screen, using invisible sprites for example. Then cast a ray from the center of the screen to the target, using Line Of Sight behavior. Detect where the ray hits the invisible border, and position your magnifying glass in that point.

  • Not sure what you mean. You need to select Android(Cordova) option, then in the next dialog you will be able to choose Android Build - Debug APK

  • File size in a browser game affects loading time. But for memory usage the image dimensions in pixels are critical. So if there is a lot of transparent space around the image, cropping it will reduce memory usage.

    What is the maximum memory usage in your game? You can see it if you right click on the project name, select Tools, Project Statistics.

    My estimation that if it's under 1GB, it should be fine for a browser game.

  • Chech out this demo:

    dropbox.com/s/srgf9lme08by9wa/JSON-RecursiveRead.c3p

    I find it quite useful - it shows full paths for all keys in JSON.

  • edsonticjoy Congrats, the game looks really nice! I love how simple and clean the graphics is!

  • I've used such effect in Construct 2, I think it was called "Force 16 color palette":

    construct.net/en/forum/construct-2/effects-31/effect-force-colors-119594

    Maybe you can find someone who would port it for C3.

    If you find that or similar effect, you can apply it to the entire layout.

  • And here is a tutorial, you can just copy the keyboard from it:

    construct.net/en/tutorials/mobile-keyboard-hall-fame-738

  • First of all, there is a much easier way to remove spaces from the beginning or end of the string - use trim(text) expression.

    Your loop never ends because you are not updating the TextInput text. You need to do this:

    TextInput set text to left(......)
    Task set text to TextInput.text
    

    And finally, I always add this condition to While loops, to prevent infinite loops:

    loopindex<1000

    So even if you created an infinite loop by accident, it will stop after 1000 iteration and will not freeze your browser.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You don't need to know JS. Simply add a script in your event with one line of code:

    runtime.callFunction(runtime.globalVars.funcName)

    , where funcName is the global variable containing the name of a function you want to call.

    One problem with this method is that it may not work if you choose advanced minification when exporting.

  • I have never seen this "Loops" section. I tried adding a few loops and recursive function calls in a test project and still don't see it in the debug view.

    Could you post a screenshot?

  • Well, you can try creating an object with dictionary key name, then checking if it belongs to the family. If not - delete it immediately.

    This may not be a good solution if you have lots of keys in the dictionary, which may match different object names.

  • So the dictionary may contain keys like "chicken", "banana" and "apple". But you only want to create objects from the family "Fruits", and avoid creating the chicken sprite?

    I'm afraid the only option is to make a list of all objects in the family. It may be a simple text variable with a comma-separated object names. Then you can use find() expression to check if the dictionary key is in this list.

  • Two ways -

    1. Use function maps, there is a template in C3 explaining how they work.

    2. Call the function from a script. For example - runtime.callFunction(runtime.globalVars.funcName)

    The second method if much easier.