Forum rules - please read before posting.

Move character with A, D, and space keys?

edited August 2019 in Technical Q&A

Suuuuup dudes
i have a question... i am making a 2D game and i want my character to move right or left with A and D keys and jump with SPACE key... I know i can make a platformer, but i really like the adventure creator features... So the point is i wanna make something like platformer but would like to use the ac features - dialogs and everything... Is there a way to do this? Please you would really save my game......

Comments

  • edited August 2019

    Off the top of my head, haven't tested this but a route for you to investigate:

    You could use Active Inputs to map a keyboard key. You can see how to use Active Inputs in Chris's tutorial here: at about 2:35:26 in.

    Then in an Action List, have an Input: Check node for that keypress, followed by an Object: Transform node. Drag your sprite player gameobject in here and Translate: By a positive X value to move forward. Experiment with values.

    Do a similar setup for moving backwards with a negative X value instead.

    Jumping seems more complicated, but this may get you on the right track.

  • Welcome to the community, @DavidTheGoat.

    No need for anything so complicated for left/right movement. Setting your game's Movement method to Direct gives you w/a/s/d control.

    However, AC is not designed for platformer games and does not have 2D platformer/jumping mechanics. If you are knowledgable of scripting, however, you can make use of a separate asset or script for player movement (e.g. the Corgi engine), and create a bridge script to connect the two together.

    The Manual's "Custom motion controllers" chapter covers the principles involved, but as every asset is different there is unfortunately no "set way" to bridge two systems together.

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.