dop2000's Recent Forum Activity

  • variable Cents=0

    Set Cents to round((cash-int(cash))*100)

    Set text "txt_cash" to -> int(cash) & "." & zeropad(Cents,2)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can't read collision polygon size, but you can get image points position. So the solution would be to define 2 image points on each frame and then adjust your physics object accordingly.

    Use sprite.imagepointX(mage point number or name here) and sprite.imagepointY() expressions.

  • brunopalermo I think the main benefit of this method is that you can define different collision polygons for different frames/animations on the character, for better interaction with other objects. (Say, extended arm with a sword in "Attack" animation will damage enemies etc.)

    If you have Platform behavior on the same sprite, then constantly changing collision polygons can mess with Platform movements. For example, that extended arm with the sword will push the character away from walls. Or character can collide with the floor on some frames and "jump" for a few pixels, or lose connection with the floor and switch to "falling" state for a brief moment.

    If you have events like "If Platform is falling, Set animation to Falling", the character will switch from one animation to another very quickly.

    You probably know all this already, in this case I was explaining it to ssaamonn

    Simply create a rectangular sprite the same size as your character, make it invisible.

    Add Pin behavior to your character, on start of layout pin it to that sprite.

    Remove Platform behavior from your character and add it to that invisible sprite.

  • I suggest you do this without the TextBox. Use Text or SpriteFont object.

    It's easy -

    "On Any Key Pressed" if it's on of the letters/numbers, add it to the text. If backspace pressed, remove last character from text. On Enter, submit the string. And ignore all other keys.

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

dop2000's avatar

dop2000

Online Now

Member since 26 May, 2016
Last online 31 Jan, 2025

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies