1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

GMS 2 New way to drop through platforms

Discussion in 'Tutorials' started by Obj_Neil, May 18, 2019.

  1. Obj_Neil

    Obj_Neil Member

    Joined:
    Apr 19, 2019
    Posts:
    21
    GM Version: GMS2
    Target Platform: ALL
    Download: N/A
    Links: N/A

    Summary:
    I haven't seen anyone go about doing it this way. I show an easy way to have player drop through platforms by using a simple timer and change state. I haven't been able to find any issues or bugs with this method.

    Tutorial:
     
    jonjons likes this.
  2. chance

    chance predictably random Forum Staff Moderator

    Joined:
    Apr 22, 2016
    Posts:
    799
    The video snippets don't offer much detail or context. But your code looks organized.

    However, your explanation about falling through platforms is not very organized. The explanation is interspersed with other aspects of your state-machine approach. So one gets the impression you're explaining this for the first time, without much planning. That said, experienced programmers should be able to follow it.

    As you said, your technique doesn't really require a full state machine for every player action. A simpler approach that toggles a "collision enable" flag should work too. Not altogether different from more traditional approaches to this problem.

    But overall, this seems fine. Just a bit rambling.
     
  3. Obj_Neil

    Obj_Neil Member

    Joined:
    Apr 19, 2019
    Posts:
    21
    Thanks for the feedback. I tried to give a quick overview for those that don't need anything explained in the beginning, then go into a bit more detail for those that might need it.
     
  4. NeZvers

    NeZvers Member

    Joined:
    Mar 24, 2018
    Posts:
    320
    I prefer different method - collide if player been above and if wants to drop through save ID of the platform and clears ID if it’s safe for not collision rules.
    EDIT: I got an even better system working for my grid collision system. Pretty simple if feet are above (free or not in same platform type tile) and pixel bellow + vsp (vsp>=0) is inside platform tile, then snap to platform tile top. Also bypass this with - if not (jumpButton and downButton).
     
    Last edited: May 27, 2019

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice