dop2000's Forum Posts

  • Well, if you have different AJAX requests in the game for different file types, you might want to add conditions like these:

    System compare two values (left(AJAX.tag,5)="steps") ... Array set value... 
    else
    System compare two values (left(AJAX.tag,3)="dot") ... Array set value... 
    
  • It doesn't matter! AJAX.tag will return tag anywhere in this event.

    Look, this guessing game is taking too much time, you need to post your project file if you can't figure it out yourself.

  • Yes, there is. From the manual:

  • No, that won't work.

    You need to use "AJAX On any completed", and inside this event compare AJAX.Tag. If you need, you can also get file number by removing "A" from the tag, for example int(replace(AJAX.Tag, "A", ""))

  • I don't know. Run the project in debug mode, check array contents, try changing events, check debug mode again etc. It's basic troubleshooting.

  • https://www.google.com/search?q=mime+type

    Just leave it empty

  • use "Invoke download of string" action.

  • Create another sub-event and move "Browser invoke download" there. It should run after the loop, not inside the loop.

  • I told you in my previous comment that you forgot to insert line breaks between each JSON string. Add line breaks (newline) and it will work.

    For each Dot : Set variable s to (s & Dot.AsJSON & newline)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.