GMS 2 How to make collision masks and deal melee damage?

Discussion in 'Programming' started by BlueKitsune, Aug 15, 2017.

  1. BlueKitsune

    BlueKitsune Member

    Joined:
    Aug 15, 2017
    Posts:
    4
    Sorry if this sounds like a really stupid question i haven't been using GMS2 for very long but i can't find a tutorial for this anywhere since most of them use ranged attacks.

    So basically i want the damage system to be completely in the enemy's favour, where the player does about 1 dmg and the enemy does something like 9999, but the player would have a 2% crit chance where they could win. I have the math.random code for the crit chance but I'm completely clueless when it comes to how to set up the collision mask and deal the actual damage.

    The player would have about 5-10 npc allies that would die from the same enemy attack so that part would probably just be like a magic attack but a guide for the melee stuff would be greatly appreciated. ^_^

    Let me know if you needed any more info!
     
  2. Simon Gust

    Simon Gust Member

    Joined:
    Nov 15, 2016
    Posts:
    3,144
    It's pretty much like a ranged attack except it doesn't move around. It stays for a duration and is destroyed once it hits something. A square basically that appears in front of the attacker.
     

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