Simulate Movement

0 favourites
  • 6 posts
From the Asset Store
Basketball Practice is HTML5 game written in construct 2 and 3 engine that simulates hooping.
  • So I have a Hero with 8 Way Movement Behavior, but I am not using the Keyboard. I created Sprites for each direction, but it doesn't appear that in the Conditions and Actions you can select Diagonals, only Up,Right,Down,Left. Any idea how to code it so you can move diagonal?

    Thanks

    Brett

  • Setting actions to simulate controls in 2 different directions should work. So if you simulate pressing up and simulate pressing right at the same time, the sprite should move at an up-right diagonal.

  • You can simulate more than on direction at a time.

    Right, and down would give you.....

    Edit:

    ninja'd

    Also you might want to set up your own movement at some point. A diagonal is just changing both x, and y.

  • Wow, I feel stupid, totally should have tried that first. Thank you. Thanks newt that is something to think on for the future, right now I just need basic, but that is good to know.

    Brett

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • INTERESTING FIND!

    So I did what you suggested and all good, but I also stumbled onto something very interesting, you don't actually need the Diagonals. Yes, check this out.

    I have 4 Sprites for N,E,S,W setup in that configuration. I have the events setup so that "Is in Touch" so as you drag your finger across N Hero moves North, as you drag your finger across E Hero moves East and so forth, BUT Here is the magic IF your finger drags/is overlapping two sprites for example N and E the Hero moves NE, Yes diagonally North-East.

    That is excellent, I am sure Ashley is going to be like duh I coded that in there :)

    Nice find, saves me 4 other sprites or frames.

    Thanks

    Brett

  • Zelda? They did that before, without the touch screen.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)