Player Weapons


Having finished the hand detection it's now time to move on to what the system's main use is for. The weapons. The player has been able to attack their opposition but they've only had been able to use one 'weapon' which is now assigned as the sword and shield. However we want the player to have a multitude of weapons available to them at the beginning of the run based of the starting ace card they chose. Essentially, the suit that the player picks up will determine their weapon for the run. So, if they get the ace card with the suit of hearts then they will go through their run using a sword and shield. Continuing this, if they get the spade they'll use a bow and arrow, diamond will give them twin blades, and clubs will give them, well, a club.

So I needed to start coding these functionalities for the player. I started of with the bow and arrow as I believed it would be the most challenging to have it's base functions done. To accomplish this I used the same basis as the archer enemy by having an arrow get instantiated in front of the player and having the arrow itself shot forward using impulse. With this the basic attack for the bow and arrow was complete. For the secondary attack I just had the arrow shoot at a much faster speed as well as deal higher damage and for the third attack I had the player shoot a volley of arrows.

 Now for the other weapons. The Twin blades' gimmick is their fast attack speed at the cost of range. Because of this the player needs to get close to their enemies to attack. To accomplish this I modified the base attack the player already had and increased the attack speed whilst decreasing the range. Doing so accomplished the effect, then I added other attacks that would, give the attacks range as well as damage but had a decent cool down timer. Next, the club weapon, whose gimmick is dealing high damage at the cost of mobility. The main plan for this weapon is having it's range be the same as the sword and shield and attacks deal heavy damage but once the player attacked they had a lengthy recovery timer that could but them in a bad situation. So the player would need to time their attack effectively as to deal damage without it being dealt back. Lastly is the sword and shield whose base attacks became the blueprints for all the other weapons. This is the weapon for beginners as it's attacks provide good range and damage output whilst giving some protection due to the shield the player carries. Essentially, the plan is for the player to take reduced damage as they attack. 


With all of the basic functionality done (No cool animations just yet) as well as setting up the detection system to give the player the appropriate weapon based on the starting cards suit we are one step closer to a finished product. Next will be giving the player character the animations and weapons in their hand as it's just particle effects that demonstrate attacks as of now. 

Published on 4/19/2024

Author: Gustavo Camacho

Get Suits of the Abyss

Leave a comment

Log in with itch.io to leave a comment.