dop2000's Forum Posts

  • Please post your code or project file.

  • Looks like there is no line breaks between each JSON string. Other than that, what do you worry about? Just create new Dot instances and set them from these JSON strings one by one.

  • Never use "Trigger once" when multiple object instances are involved. Events like "Enemy overlapping bullet, Trigger once..." will cause all kinds of bugs and problems! Same goes about using "Trigger once" inside triggered events, loops - don't use it unless you absolutely certainly know what you are doing.

    You need to post your project file or a screenshot of your events.

  • You can't get dots from another layout.

    What you can do is save dots for each letter in JSON format in a text file. Then when you need to re-create dots for any letter, you read them from that text file, create dot object and load it from JSON string.

    Something like this:

    // SAVING DOTS FOR ANY LETTER
    For each Dot : 	Set variable s to (s & Dot.AsJSON & newline)
    
    Browser invoke download string s
    // then save it as a text file
    
    
    
    // RESTORING DOTS FOR A LETTER
    // First read the text file into variable s with AJAX
    
    Repeat (tokencount(s, newline)-1) times
    	Create dot
    	Dot load from JSON tokenat(s, loopindex, newline)
    
  • Many popular addons have been ported to C3. Don't know about Cranberrygame addons though, you will need to research. Also, there is Plugin Converter which you can try, but it only supports runtime 2.

    If you can't find Cranberrygame addons for C3, the best option would be removing them from your project, then migrate to C3 and find alternative plugins/addons. For example, there is now a native sharing plugin in C3.

    Also, take a look at this massive collection by ChadoriReborn, it's not free, but well worth the asking price:

    chadorirebornxd.itch.io/construct-master-collection

    construct.net/en/forum/construct-3/plugin-sdk-10/construct-master-collection-139046

  • With hundreds of objects you should definitely disable behaviors for objects which are too far away. You can use "Is on screen" condition or distance() expression. So you can do something like this:

    Every 2 seconds:
     Pick EnemiesFamily where distance(EnemiesFamily.x, EnemiesFamily.y, Player.x, Player.y)<2000
    	EnemiesFamily enable behaviors
    
     Pick EnemiesFamily where distance(EnemiesFamily.x, EnemiesFamily.y, Player.x, Player.y)>2000
    	EnemiesFamily disable behaviors
    
    

    Note, that if you have too many objects, even disabled behaviors can affect performance. You might want to create objects only when player gets close to them, and destroy objects which are left far behind.

  • It's possible, but Construct is not the best tool for this job. You need to read the spreadsheet data into an array, then loop through the array to find records for a particular client, and then display them somehow - feed to a textbox or list.

    You can do the same much easier directly in Excel, in literally a few clicks. If you need to edit/review data using forms and reports, I suggest Microsoft Access.

  • I opened "Chat room" template in C2 just now and it works perfectly fine.

  • Wow, this almost scares me. How easy is it?

    If you open the capx attached to the tutorial, you'll see that "Split screen" group has only 6 events.

    If you paste complete layers onto the canvas, instead of individual objects, the code will be even shorter.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why do you need a character 1920x1080 pixels in size? This is insane. Please read this article:

    construct.net/en/blogs/construct-official-blog-1/remember-not-waste-memory-796

  • Ashley I don't want to create a new post for this simple request, but could you also change the way Escape button works when editing scripts in event sheets?

    Now, with autocomplete I often find myself pressing Esc button to close an unwanted drop-down list (as it's done in many other IDEs). And instead this exits the script editor and undoes all edits! You can add many lines of code, then press Ecs and it will all be lost in an instant.

    Could you change it so that pressing Esc first time closes any drop-down lists, pressing it second time exits the script editor, but preserving all changes?

    .

    Please vote for this idea if you agree:

    construct3.ideas.aha.io/ideas/C3-I-1187

  • Use anchor only for the white sprite, remove anchor from the red sprite. Pin red sprite to the white sprite on start of the layout. And of course set the origin image point on the red sprite at the right edge.

  • Search the tutorials section, there are lots of good (and bad) examples.

    It all greatly depends on your game, but you can use something like this as a starting point:

  • Examples you posted are for HTML DOM objects, they will not work for Text in Construct.

    You need to change horizontalAlign property, as described here:

    construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/text

    This works for me, but you need to run it in the latest beta version:

    const textObject = runtime.objects.Text;
    const textInstance = textObject.getFirstPickedInstance();
    
    textInstance.horizontalAlign="center";
    

    I'm new to scripting, so if anyone knows how to optimize this code, please tell.