dop2000's Forum Posts

  • So the mask size and position should always be the same, but the map inside the mask can scale and move?

    I believe you can do this much easier. Put the map on the bottom layer with scale rate=100, put the mask sprite on the layer above it with scale rate=0. Set blend mode=Destination In on the mask layer (not on the mask sprite!). Also set Unbounded scrolling=yes for the layout and scale rate=0 for all other layers.

    You should be able to scale the bottom layer inside the mask.

  • Try this (use System Is between values):

  • It's much easier in C3 - just add a font to Fonts folder and you will be able to use it in the project, even select this font in layout editor.

  • Finding screen coordinates for a character in Text object is almost impossible, because browsers render text differently. You can do it with SpriteFont, but this will still be a difficult task.

    I suggest using find() expression to search for the first "_" character. If player types the correct letter, replace this "_" with the letter:

    Set n to find(MyText, "_")
    Set MyText to left(MyText, n) & TypedLetter & right(MyText, len(MyText)-n-1)
    

    Then repeat for the next letter and so on. Demo:

    dropbox.com/s/p4gydwzsx9jm2j4/FillTheBlankWord.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • here, I tried the snake idea. (cos its more interesting than working on my own game!)

    Yeah, that's why we are all here :)

    Your example looks nice!

    I stole your trace sprite with fading frames, and updated my demo for multiple bullets:

    dropbox.com/s/7tfobtbs6vqwoud/BulletTrail3.c3p

  • The easiest solution is to use another family with the same set of objects:

  • AsJSON string contains all information about the object instance. You can use it to save/restore/copy instances easily. See the official manual:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/common-features/common-expressions

    .

    Source instance is the one you continue to drag. Its z-index doesn't change. You can change z-order of the newly created instance however you like.

  • Cloning a family member (use "Create by name" action):

  • Easy:

    You create a clone and continue to drag the original sprite.

  • Have you tried adding "Browser log"? it's one of the easiest ways to debug such problems. If you can't resolve it yourself, please post your capx.

  • Add debug output, open browser console in preview (F12) and you'll be able to see what's going on:

    Actually, if F.Param(2) is the X-index in the array, you don't need "For each X", simply set return value to playersDB.At(F.Param(2))

  • Ok, I spent almost the entire day and finally figured out what was causing this stupid bug. I have too many text objects with web font on this layout - over 400. If I don't set the web font for them, Back button works without any delay.

    If anyone knows how to fix it without removing hundreds of text objects, please let me know.

  • I like using Scale Outer mode. See this post:

    construct.net/en/forum/construct-2/how-do-i-18/full-screen-138474

  • You are aware that this post is 5 years old?

    Answering your question - you can't create object on another layout. But you can "schedule" it using global variables. So when that another layout starts, check the global variable and create objects if needed.

    For example, in the main menu player chooses game difficulty. If difficulty=Hard, then you want to create some zombies when the level starts. So you can add a global variable ZombiesToCreate=0. When player selected hard difficulty, set ZombiesToCreate=10.

    On start of the Level1 layout do

    Repeat ZombiesToCreate times : System create Zombie...

  • There is a useful new action "Wait for previous action to complete" for asynchronous operations like LocalStorage or AJAX. Change your code like this: