Forum rules - please read before posting.

2d going down stairs - how to make character drop down below the floor?

Hello. Happy New Year!

I have several rooms with stairs. In the room in the image I want the character to look like he is going down these stairs (see image)
What is the best way to approach this?
Thanks!

Comments

  • First make the portion of the floor that the character will go behind (i.e. in between the hole and the camera) a separate sprite. So the regular floor sprite has a Sprite Order of e.g. -3, and the cut-out sprite has one of e.g. -1. (This way, a character sprite order of 0 always appears above both).

    If the sequence is part of a controlled Cutscene, you can begin the Cutscene with a Character: Change rendering Action, setting Sorting to Set, Sorting Type to Order In Layer, and New order to -2.

    This will force the character sprite to have a sprite order of -2 (i.e. between the two floor sprites), so that he appears correctly between them when moving into the hole. Use another such Action to release the sprite lock.

    One thing to note, however, is that there is currently a bug with this Action in the latest release (v1.70). See this thread for steps to resolve it.

  • Hi. Phoo. I had a bit of a hiatus. Now, stuck at home, there is more time!
    I am back on this problem - of characters going down stairs:

    I have got the character going nicely up and down stairs where you see the flight of stairs from the front. The only problem I am having here is that often the character comes to rest with its feet halfway up a step, which looks a bit stupid, but I can live with it for now.

    A hopefuly more simple problem I am having:
    I have one staircase shown from the side where I am moving the character between 2D markers. https://imgur.com/a/h1pfy4I
    They are offset in both x and y, because the staircase descends from left to right.

    I want the character animation to only Walk Right when it is moving diagonally down and right on the screen (and not Walk Down) and to only Walk Left when he is moving diagonally left and up (and not Walk Up).

    Is there a way to constrain the character animations to these two?
    i.e. I want to disable CharacterWalk_U and CharacterWalk_Down.

    Thanks!

  • Is there a way to constrain the character animations to these two?

    Yes, you can use the same Character: Change rendering Action to enforce the Sprite Direction to either right or left.

    Alternatively, you could animate the character's movement with Timeline, and use AC's Character Animation 2D track to enforce a facing direction.

  • Thanks.

    I looked at Character: Change rendering. I guess this is the best option for me, but I want the player to be able to CharacterWalk_L and CharacterWalk_R, depending on whether the player clicks to the left or right of the player sprite.

    Am I correct that the best way to make this happen is to script something using OnPointAndClick?

    I figure I could use an If, relative to the player's vector location, to keep switching 'set' 'New Direction' between 'left' and 'right',

    OR is there a simpler way to do this using Action Lists, without getting into coding?

  • Oh, so the player's free to point-and-click while on the stairs - as opposed to this being all in a cutscene?

    A 2D character's Inspector lets you configure which directions they can face by setting their Facing directions field to Custom.

    However, it's not currently possible to configure these directions at runtime or through script. I shall look into this as part of the next update.

  • Yeah, exactly - during gameplay.
    I had seen that was possible (with the Custom Facing Directions), and had considered creating a duplicate of the character for this part of the Scene with only the relevant directions possible.
    That would be a totally awesome update! Great stuff, thanks Chris!

  • Hmm, I am now having some further unanticipated problems with this:

    I do also have some sections where the character is walking downstairs in a cutscene.

    I use Character: Change Rendering to set the direction of movement during these moments. I hadn't noticed before - because I was just trying to get things working generally and hadn't worked backwards to do the reverse ActionLists for going back up the stairs - but whereas setting the direction to 'Right' works, setting the direction to 'Left' doesn't - the character performs as if its direction is also set to 'Right'.

    Could this be because I was lazy and used the Frame Flipping function on the character's walk animations? Or could I have missed something more subtle?

  • That would be a totally awesome update!

    I've been looking into this and yes, I'll see about enabling an option to redefine the facing directions with the Character: Change rendering Action.

    the character performs as if its direction is also set to 'Right'.

    Which way are you frame flipping?

  • I'll see about enabling an option to redefine the facing directions with the Character: Change rendering Action.

    Fantastic!

    Which way are you frame flipping?

    I am frame flipping with 'Left Mirrors Right'

  • I am frame flipping with 'Left Mirrors Right'

    Recreated - I'll see that this is addressed as well.

  • MEGA. Thanks. Happy weirdest Easter in a while!

  • In case you're reading this entry in search of how to do this,

    You can now affect the precise directions you want the player character to move in:

    Go to 'Action Type:Character:Change rendering'
    tick the 'rebuild directions' option,
    choose 'Custom' and you can choose which directions the player will move in by ticking/unticking the direction check boxes.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.