How do I switch between Platform movement and 8Direction movement?

1 favourites
  • 4 posts
From the Asset Store
Design for game, asset for game, game kit, UI design, completed design for game, mobile game, Dashify Switch
  • Recently I've been trying to create a game that has floating water, and when you're in the water you switch from the Platform behavior to the 8Direction behavior. However, this has presented a couple of issues.

    The first is that when entering the water from the side, you buffer for a bit before getting in, like the water is initially repelling you.

    The second is that when entering the water from above or below, the Platform behavior action for the gravity and/or jump is still saved, meaning that when you come out of the water you either do a short hop, or fall at maximum speed.

    I would also like to figure out how to activate the Platform behavior upon exit from the water so that the water could be jumped from, however for now I simply want to fix these two bugs listed above.

    Here is the snippet of my event sheet that deals with the water:

    Assuming the image has attached correctly, here is the latest version of my game as well: drive.google.com/drive/folders/1_flHqvZywkaSl6mF06_X4ozxskWl9bQ3

    If the image has not attached correctly, it should be the first few events under the "Sharkcat Controls" group.

  • Invert the -is overlapping get rid of the else.switch activate and deactivate here.

    Now you activate when jumping in and reset to normal when not overlapping.

  • Thank you for the reply, unfortunately I didn't happen to see it till recently. My project is on a deadline (school and whatnot) so I've since gotten rid of the water as a feature entirely, but I do appreciate the help regardless.

    I did try out what you mentioned, and while it does help get rid of some unnecessary code, it doesn't actually fix my issues? I've realized that this is because your values for the respective type of movement actually still save until you enter that type of movement again, so your downwards velocity for platforming stays the same as it was upon entering the water, and it's why you do a small hop when trying to move out of the water going up if you jumped into it from below, as well as why when you re-enter water after having already been in it, it will move your character left or right respective to whichever direction you were travelling when you last exited the water overlap.

    So I do definitely appreciate your help, but unfortunately it doesn't fix the issues I've had with implementing this feature. I may take another crack at it later after the project is ready, but for now I have been unsuccessful in finding a way to fix this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you go and work on it sent me a message (I can fix the things you want)

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