dop2000's Forum Posts

  • Technically it's not a bullet, it's a ray. Use Line Of Sight behavior, cast a ray and draw a line in that direction.

    There are a few examples in C3, check them out:

    editor.construct.net

    editor.construct.net

  • If you did upload c3p file, it should be available for download to anyone on the game page.

  • Save the speed from a previous tick in a variable, for example:

  • Firstly, you can't load that JSON into a dictionary, you will have to parse it into a JSON object.

    Construct expressions (like random or choose) can't be used inside the JSON string. If you need to pick a random value between three values (20, 50 or 1), you will have to add an array in JSON:

    {
    	"apples": {
    		"number_of_seeds": [50, 20, 1]
    	}
    }
    
  • Touch.SpeedAt(0) will give you the current speed. But if you need to detect acceleration, you will have to measure the speed over some time.

    For example, you can compare the current speed with the speed in the previous tick. Add the difference (positive or negative) to a variable. After 0.5 seconds, if the variable contains a positive number, then the touch is accelerating.

  • You can report bugs here:

    github.com/Scirra/Construct-bugs/issues

  • You should definitely remove all "Trigger once" from the function, don't use them.

    I am pretty sure that the second "While" loop is infinite and that's why the browser freezes.

    If you look at the very first screenshot in your post, it has While loop in event #9. It checks if LengthOfPattern2<NonChangeableLenghtOfPattern, but these two values are not changed inside the loop. So the loop just never ends.

  • I just noticed you have "While" loops with "Trigger once". You are probably creating an infinite loop, press F12 and check for errors in the browser console.

    Can you explain why do you have "While" loop and what exactly are you trying to do in that function?

  • I just discovered that you can create custom actions (and hopefully custom expressions soon) pretty much for any object type! This is so incredibly awesome!

    Also, it would be great if we could convert existing functions to custom actions. I posted a suggestion:

    construct23.ideas.aha.io/ideas/C23-I-146

  • "Is touching" condition is continuous, it repeats many times per second while the finger is touching the screen. You need to use a trigger condition - "On touched" or "On tap", they will only be triggered once.

  • Booleans are super cumbersome to deal with in Construct. I never use them.

  • You added "Else" as a separate (empty) event. You need to add "Else" as the first condition to "curRound=2" event.

  • You can right-click the layout and copy it, then paste to another project. Then copy-paste all events from the event sheet. If there are any objects or variables missing, the editor will tell you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think collision checks now are pretty well optimized and not as bad as they used to be. You shouldn't worry too much about running a few hundreds or even thousands overlapping/collisions checks on every tick or making complex polygons where needed.

    Creating many objects on every tick is also not that bad by itself. It's loading textures what's usually causing lags. So if the images are already in memory and the objects don't have many behaviors, spawning them shouldn't use a lot of resources. In my project I'm periodically creating and destroying thousands of small objects, and most times the lag is not noticeable.

  • They mention this: "Disabling "Memory Saver" and adding my site to "Always keep these sites active" completely fixes the issue."

    I checked my Chrome settings and it had Memory Saver disabled by default. I added *construct.net to the list of active sites, and so far the editor didn't lag today for me!

    .

    alastair Do you get this error in the editor or in preview? I learned that open tabs in the editor consume a lot of memory, so if you are able to load the project, try closing some tabs in it.

    If you can't even load the project, extract all files into a folder and delete all *.uistate.json files. After that you should be able to open it.