LittleStain's Forum Posts

  • The most important part in creating scroll is comparing the start of the touchinput with the current touchposition.

    Second most important thing is to disable unwanted input while scrolling.

    My personal preference is creating a sprite on touch start if the touch is not overlapping an active part, store the touch start positions as variables in this sprite and compare touch position with this sprite. While this sprite is visible all other events except the scrolling are disabled by deactivating the groups they are in. if touch.y is less than sprite.oldY I set the position of the things I want to scroll to their y position minus abs(sprite.oldy-touch.y), if touch.y is more than sprite.oldy I add abs(sprite.oldy-touch.y) to their current y-position.

    Those are the basics for vertical scrolling I guess..

  • Instead of scrolling the layout, you could easily adjust to scroll a layer. This way you could let a part be obscured by layers on top or you could use blendmodes to make part of the layer invisible.

  • I've seen many examples of scrolling in the forums, why not adjust one of those to your needs?

  • I don't recommend using third party plugins that often, but maybe you should look into the nickname plugin, you can find it in the plugin section of the forum.

  • Very interesting..

    This should be doable with an overlapping at offset check. add the number to a variable and set tilemap tile based on the variable.

    You could ofcourse also use an array for this.

  • Working with multi-touch isn't always easy, but basically the event should have two conditions.

    on touched button2

    is touching button1

    • do something.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Instead of using the drag and drop behaviour you could choose to do something like this.

    give the object three instance variables, picked, offsetX, OffsetY

    on object clicked

    • set picked to true
    • set offsetx to object.x-mouse.x
    • set offsety to object.y-mouse.y

    object is picked

    • set object x to mouse.x+object.offsetx
    • set object y to mouse.y+object.offsety

    on mouse button released - object set picked to false

    I'm on mobile, so I can't check the events inside construct atm, but it should be something like this.

  • rojohound No apologies needed, sometimes the way it's written helps the reader more than the message itself.

    Your comments and explanation of using math in Construct2 have helped many, myself included, so in my opinion a comment by you is never redundant.

  • Have you checked your collision polygon(s)?

  • Keyboard on shift pressed and keycode is?

  • floor(0.1) = 0

    so if you add 0 the variable stays the same.

    you should probably just add 0.1 to your variable and when you want to use the variable anywhere, use floor(variable) so when variable is 0.9 it will return 0 and when the variable is 1 or 1.1 etcetera it will return 1.

  • If you could tell me what your system is and what you percieve to be a superreward, maybe I can help.

  • the turret behaviour automaticaly sets the right bullet direction on shoot so setting the bullet angle conflicts with the behaviour. Actually the turret behaviour uses predictive aim, so the bullet will fly to where the enemy will be if he keeps moving in the same direction at the same speed.

  • What is the benefit of doing it in a different way than the intended one?

    Why try to make it work this way when there is a perfectly good solution to do it that is not only easier, but also less prone to unwanted behaviour?