GreatZ Posted May 20, 2021 Share Posted May 20, 2021 Hi, i've changed the size of the sprites , when I try to hit a target, if I hit the top of the sprite, it takes no damage but gets crossed. come can i solve? Link to comment Share on other sites More sharing options...
2 Blinkuz Posted May 21, 2021 Share Posted May 21, 2021 2 hours ago, GreatZ said: Can you show me how pls? thanks in advance Well, it is what I said before, look in the client code specifically in the entities/projectile.cs file and where the spawn of the projectiles is managed, you will see the code in charge of assigning the animations, you just have to make the property that saves the animation be nullable or empty, and in the assignment of the animation you check if the object is null you do not do it, this is in a general way and what would be less complex, in my case I have the following:  The second check is to avoid that two of the spawns collide in the same skill, in this way you do not completely eliminate the functionality that comes by default of being able to create separate projectile spanws. Hahaha this image explains a little better how to choose which spawn should have animation, credits to Arufonsu who also worked with me on this. Link to comment Share on other sites More sharing options...
0 Cheshire Posted May 20, 2021 Share Posted May 20, 2021 You'll have to rewrite projectile logic and collision logic for the engine to recognise hits beyond the tiles that an object currently occupied. Â It's not something the base engine is currently capable of. Link to comment Share on other sites More sharing options...
0 Blinkuz Posted May 20, 2021 Share Posted May 20, 2021 One suggestion that would be the easiest and simplest is to reuse the spawns code, specifically creating invisible spawns. Link to comment Share on other sites More sharing options...
0 Cheshire Posted May 21, 2021 Share Posted May 21, 2021 That sounds like a pretty hacky solution that won't perform very well when scaled up to larger amounts of players and projectiles. Â Personally I'd invest time into making actual hitbox objects and base collision on those. Link to comment Share on other sites More sharing options...
0 Blinkuz Posted May 21, 2021 Share Posted May 21, 2021 I understand your point, but restructuring the entire current hitbox system I see it a bit complex, at least I did not find any viable option so far that I can include in the engine without breaking everything, this solution that they suggested of the invisible spawns was suggested by the same JC in the past to have projectiles with larger collisions that are not pixel perfect since X amount of tiles is taken for each spawn. Link to comment Share on other sites More sharing options...
-1 GreatZ Posted May 21, 2021 Author Share Posted May 21, 2021 28 minutes ago, Blinkuz said: I understand your point, but restructuring the entire current hitbox system I see it a bit complex, at least I did not find any viable option so far that I can include in the engine without breaking everything, this solution that they suggested of the invisible spawns was suggested by the same JC in the past to have projectiles with larger collisions that are not pixel perfect since X amount of tiles is taken for each spawn. Can you show me how pls? thanks in advance Link to comment Share on other sites More sharing options...
Question
GreatZ
Hi, i've changed the size of the sprites , when I try to hit a target, if I hit the top of the sprite, it takes no damage but gets crossed. come can i solve?
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now