dop2000's Forum Posts

  • Here is another way to smoothly rotate a sprite 360 degrees in 1 second.

    Using "dt" guarantees constant speed even if the frame rate changes.

  • Yeah, TextBox "intercepts" most keyboard events. I think "On Return" and "On Escape pressed" are the only ones that work inside the text box.

    Thanks!

  • Are you using TextBox?

    You can use "Keyboard -> On Return pressed", this event triggers even when cursor is inside the textbox.

    I've just tested, it works on mobile with on-screen keyboard.

    Thanks for the coffee! : )

  • In your capx you made every bullet harmless for 5 seconds.. Which is wrong, obviously.

    For this task it's best to use Timer.

    Add isImmune boolean instance variable to your Player sprite and Timer behavior.

    Change your code like this:

    (clickable)

  • Oh, sorry, I misread your previous comment.

    You need to add "Set bullet speed=1000" after "Set Bullet enabled". This will reset the speed.

  • You can request fullscreen only after a touch or mouse event.

    For example "On tap -> Browser request fullscreen"

    Note, that you can't do it in "On touch start", it will not work in some mobile browsers. Better use "On Tap" or "On touch end" or wait 1 frame after "On touch start".

  • Yeah, angles in C2 can be confusing. Say, angles -30, 330 and 690 are actually the same angle.

    If you use system expressions anglediff, anglelerp, anglerotate etc. - they take care of conversions for you.

    For example anglediff(-29, 690) = 1

    If you still can't fix it, please share your capx or a screenshot of your code.

  • Not sure you can get collision polygon coordinates in C2, at least not without external plugins or complex formulas with hundreds of overlapping checks.

    You can make a "clone" of the collision polygon with image points and move from one point to another. I did something similar in this post:

    This post may also be relevant:

  • Looks like the bullet behavior is still enabled.

    Try to disable it in the same event where you respawning the player.

  • So you have published games on the Arcade and yet you have absolutely no idea how they work? Lol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Set acceleration and deceleration to 10000 for sharper controls.

    Also you should probably remove Platform behavior, since you are using 8-Direction.

  • Ok, then compare Y of your character sprite with Y of your block sprite.

    If character.Y is greater than block.Y, then it's below block center and you can give coins.

    You can do it in "Character->On collision with Block" event.

  • I don't know what "question block" is, I assume it's a sprite.

    If its origin point is in the middle, you can do this:

    On touched object Block

    Block compare Y < Touch.Y : (give coins)

  • Add all objects to a container. When you create one object, other objects from this container will be created automatically.

  • Do you mean this animation?

    Subscribe to Construct videos now

    It's easy to do with Bullet behavior.

    Set angle of motion=-90

    speed=1000

    gravity=2000

    And, probably disable collisions.