How do I use weapons

0 favourites
  • 7 posts
From the Asset Store
75 sci-fi and futuristic weapon sound effects, from lasers and beam weapons, to space cannons and rifles etc.
  • I've seen some ways of doing this, such as attaching sword to the player and setting the sword's angle.

    I don't want to use this method because wouldn't work well in a character with a good resolution, where u can see clearly the details with a bunch of animations.

    I thought I could do it using a different animations with weapons and no weapons. For exemple: Idle, idle_Weapon, Running, Running_Weapon, etc...

    This way I could explore more the animations quality but then I thought...How do I identify colisions properly if it's all the same thing?So, if I touch the enemy just with the sword, I would take damage.


  • Most of the time we create invisible objects to detect these collisions. Like, when you attack, play the attack animation and create an invisible rectangle where the attack is supposed to hit, and destroy it immediately after.

  • 7Soul

    So should I create the object with the same weapon's area and then destroy it when unequip it?

  • This object should be created as soon as the player attacks, like a flash! Imagine the player punches forward, instead of making an area on the hand that moves forward with it, you want to hit a rectangle in front of the player very fast.

    The area that the weapon hits don't need to be precisely the same shape as the weapon. If the area is bigger it gives the player a bit of a safe zone and gives a better feel of the attack

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 7Soul

    I got it. Thanks!

    Just for curiosity...According to your example, I'd should create a rectangle in the hand's edge, right?

  • I'd cover the hand, arm, a few pixels ahead of the hand, and a few pixels on the top and bottom

  • Thanks.

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