dop2000's Forum Posts

  • I don't understand. When player collides with enemy, player should die, is this correct? Then why do you want to disable collision detection?

    Anyway, you can disable collisions for any object, use "Enemy-> Set collisions enabled/disabled" action.

  • You have asked this question before:

    3 months later and you still don't know how to move character?

  • The problem is - you can't detect "Left key is down" when cursor is inside the TextBox. It's not possible in Construct 2!

    That's what I was trying to tell you!

    I know you can erase with Backspace, but some people prefer pressing Left key or Home key if they want to correct a mistake in the beginning of the line and don't want to re-type everything. And if they press any of these keys, the real cursor will move, but your fake sprite cursor will not.

  • Lol, thanks for the video! You game looks cool!

    What I meant though is what happens when you press "Left" key on the keyboard:

    For example: you type "DESTRROY ALL HUMANS" and then you notice you made a mistake in the word "DESTROY" and you press Left key several times to move cursor there and correct it.

  • Could you post the screenshot of your event that changes sprite position when Left key is pressed while typing text in TextBox?

    I'm really curious how did you do this, I don't know how to detect key presses when TextBox is in focus.

  • Have you tried typing several letters and then pres Left-Left-Left? Something tells me this will not work perfectly

  • This is really not how things are done in C2...

    You need to learn to use instances, instance variables, containers, behaviors.

    Here, I updated and optimized your capx, take a look:

    https://www.dropbox.com/s/59q3cqvmfjwdm ... .capx?dl=0

  • Here is a simple way to do this:

    (image clickable)

  • You can put an invisible sprite bigger than the house with Solid behavior.

  • There was a recent post about this:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess you'll have to use "On touch start" and "On touch end" events to detect taps.

    Here is a very basic example:

  • maxlive2010 Animation is easy, but I don't know how to make a seamless gif from it, sorry.

  • Matte78

    It depends on how these objects are created and at what moment do you need to pin them.

    Do you put them on the layout in editor? Or are they created in runtime?

    If you have instance variables on both Nations and Cities families that cal help to link them together (say, Nations.Name="France" and Cities.NationName="France") then it's easy:

    Nations Compare instance variable Name=Cities.NationName -> Cities pin to Nations

    If the only way to identify each pair is their order of creation, you can do something like this:

    System-> For x=0 to Cities.count-1
       System -> Pick Nth instance of Cities instance=loopindex
          System -> Pick Nth instance of Nations instance=loopindex   :   Cities Pin to Nations
    [/code:e31akpof]
  • Is this TextBox object or Text object? If it's textbox, what happens with the sprite if user moves cursor pressing buttons Left, Right, End, Home? Or decides to select text holding Shift?

  • And it never will. Also, how are you going to move the sprite if user presses keys like Left, Right, End, Home?