dop2000's Forum Posts

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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 .....
    
  • Instead of "sound=0" condition in event #3 use "Else"

  • Sorry, I don't have any experience with firebase.

  • I assume the events on the second screenshot are top-level events, not nested under anything else?

    While win=1 condition is true, the first event will fire on every tick and the data in LS will be overwritten. (Unless there is some other event, which immediately changes win variable from 1 to something else)

    The third event on the screenshot may also be executed multiple times, because you are using continuous condition "Is touching" instead of the "On touched" trigger.

    Local Storage operations are asynchronous, you need to be careful not to run them on every tick. And make sure that you are not attempting to read from LS before writing operation has finished.

    If you send me your project file, I'll help you to fix it :)

  • You need to create the image in some other editor - Paint, Paint.Net, Inkscape etc.

    9-patch will allow you to resize the rectangle, but the corner radius will remain the same.

  • I have already checked this topic and want something like that.

    https://www.construct.net/en/forum/construct-2/how-do-i-18/border-radius-sprite9-patch-151558

    So what exactly is the problem? There are screenshots and links in that post.

  • I am not aware of such bug in C3, but there are definitely logical mistakes in the screenshot you posted. Can you share your project file, or an updated screenshot of events?

  • Sorry, here is the correct expression:

    lowercase(left(Browser.language,2))

    The result will be "it", "en", "fr" etc.

  • This is seriously awesome! Congrats!

  • For movement buttons you need to use "Is" conditions - Is Button Down and Is Key Down. Try this:

    Gamepad Is Left button down
    OR Keyboard Is Left key down
    	Set Control_Left=true
    ELSE
    	Set Control_Left=false