You need to post your project file. It's a guess game without it.
So you have a Timer running on one of the objects? And when you restart the layout, the Timer also restarts?
It's likely because all objects are re-created when layout is restarted. You might need to use a Global object, and make sure only one instance of it is created.
Try downloading the project to your hard drive and then open. If it still doesn't work, press F12 in the editor and check error messages in Console tab.
Develop games in your browser. Powerful, performant & highly capable.
If you are on Windows, you can use the built-in Snipping Tool, or press Win+Shift+S.
Whoa! I don't understand what's going on, but it looks really cool!
Must be some issue with paypal. Don't worry about it!
Like this?
dropbox.com/s/y2m5hseb4hs9i4k/FindMatches.c3p
I don't understand your post to be honest.
With Timer behavior you can pause or stop timers. Or you can start timer only once, and in "On timer" event decide if it needs to be restarted again or not.
If you want to run a loop for enemies with health>0, you need an event with two conditions:
Enemies compare health>0 System For Each Enemies Add 1 to enemyKillCount
But as other people mentioned, this whole event should not be at the top level. It needs to be nested under some other event to be executed only once when needed. For example, when the level is finished. When it's at the top level, it will be run on every tick and your kill counter will increment like crazy.
Yeah, but even if you move event 3 under 2, the loop will not work correctly, because you are creating Enemy object, not Enemies family.
It's not really clear what you are trying to do.
You can use "On any key pressed" event, and inside it grab the key code (Keyboard.LastKeyCode) and look up which player it's associated with.
Or use raycasting feature of the Line Of Sight behavior.
https://editor.construct.net/#open=instant-hit-laser
Events are executed from top to bottom. So currently, in event #2 you set sound to 0, that's why the next event #3 is also triggered.
If you want to compare several values, you should add "Else" to each condition:
If Sound=0 ..... Else If sound=1 ..... Else If sound=2 .....
Check out this demo:
howtoconstructdemos.com/enemies-walking-around-walls-metroid-style-or-patrolling-the-perimeter-enemy-ai-capx
It doesn't use Platform behavior though.
Instead of "sound=0" condition in event #3 use "Else"