PlaceholderGames / 2020-yr1-group-7

CS1S464 2020 Group 7
1 stars 0 forks source link

The combat #24

Closed nimshi89 closed 3 years ago

nimshi89 commented 3 years ago

Okay so now the game has collusion and I can make it for other tiles as well just we need different tiles. Every enemy is on the screen now and they just need health and some other stuff and wanted to ask do you guys want to have a go with it or should I do it? :)

scrab333 commented 3 years ago

sorry i don't think i quite understand it, you mean it as a class variable correct?

scrab333 commented 3 years ago

added the health, i went with bigger numbers (around 100) since i feel liek it gives us more options to work with

nimshi89 commented 3 years ago

Okay, so some Update :D The player can kill an enemy and after it dies it will disappear from the screen. Did some adjustments to the Entity class and now the objects have health and all :) still not working perfectly since you can attack the dead enemy and for now just one enemy but I am working on it. :D

nimshi89 commented 3 years ago

So what the issue is that the attacks take an argument that will be the target and right now I am passing in "enemy" as a target. But I am unable to find a way to check if there is an enemy object around the player and then use that to be the target.

DoctorMikeReddy commented 3 years ago

Are you asking me to create a way to see if there is an enemy near the player, @nimshi89 ? What have you tried?

nimshi89 commented 3 years ago

@DoctorMikeReddy Yes, please. I did try to draw the hitbox with the rect function but it just doesn't work :/ I did post an image of the error message.

DoctorMikeReddy commented 3 years ago

Reproduced in #30 so closing now