LittleStain's Forum Posts

  • If the build in drag and drop behaviour doesn't suit your needs, best way would be to use offset..

    If you want to program it yourself, something like this should do it:

    Give the object an offsetx and offsety instance variable.

    on object touched

    • set object.offsetx to touch.x-object.x
    • set object.offsety to touch.y-object.y

    Is touching object

    • object set position to x: touch.x-object.offsetx, y: touch.y-object.offsety

    But I gues using the drag and drop - behaviour would work just as well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know the example has issues.. The way I implemented the progress is not working correctly..

    It's almost there though and with a bit of creativity I'm sure you can figure it out..

  • Not really difficult in my opinion, just use a number for every different kind of object you'd like to create in the array and use the position in the array to determine the place in the grid to spawn the object..

  • Does every frame in every animation have the same colissionpolygon?

    It's already visible from the one you posted that it only has one collision point at the bottom, which in my opinion could cause issues.

    Also the collision-lines on your backgroundfloor aren't straight (is that intentional?)

    I would recommend using a square sprite for the platform behaviour and pinning the animations on top of it, but if you want to do it this way, just make sure all colissionpolygons are the same through the entire animation, at least where they touch the floor and I would make the floor collision straight, just to be sure..

  • Either use lerp or look into one of these two third party plugins.

    Moveto and Litetween.

    You could also look at the move to example shipped with construct.

  • Have you checked all your collision polygons?

    Are they the same for each animationframe?

  • My way of doing it, which might still be a bit difficult, would be creating the objects from arrays with a single function.

    It seems your layouts are grid-based, so recreating them inside an array to determine what goes where should be relatively easy.

    Then just call a function to create a layout offscreen based on the grid of a random array..

  • Ok, so you can't really spawn a layout in another layout, because that's not what layouts are for..

    layouts are like different rooms. You can go from one room to the other, but not create a room within a room.

    You can ofcourse create the objects in your event-sheet placed like you have in the other layout.

  • As far as I know this can only be done in the editor and not through events, but I might be wrong..

  • Wasn't there a start ignoring input action?

  • You are probably going to give the character some behaviours in the future, right?

    To change it you could pin the player to the pavement, or set the player to pavement.y on start of layout, but this would probably give you issues later on when the player gets his behaviours.

    I use anchor behaviour only for hud/gui elements within a game, which is what it is meant for in my eyes.

  • There are a few ways to do this.

    Without using third party plugins using lerp would probably be your best choice, for it gives a smooth movement.

    I think though that most people like to use the third party plugins litetween or moveto for these purposes.

  • First the path has to be found and when found the monsters will follow the path.

    This is impossible in one tick.

    If instead you'd use every x seconds, so they react to player movement it could work, but it might be quite cpu intensive.

  • RookieDev

    Actually, your question has come up multiple times on this forum and no one size fits all solution has been found.

    As far as I understand the 8-direction-behaviour was intended for top-down-view games and therefor has not got this jumping functionality implemented.

    Best way I can think of to create stuf like this is having a "Feet-touch-ground"-sprite with the 8 direction behaviour and a seperate sprite with the character/animations..

    You could have the feet touch ground sprite to be the shadow of the character..

    In normal circumstances the character while being on the ground would follow the feet touch ground sprite and when jumping the two would be seperate..

    Giving the character some sort of x and y-vector movement and having it land back on the shadow.

  • I don't have this problem..