"Custom" Collision Shapes??
So i had a bullet collide with a monster. The bullet would send its x and y to the monster and the monster would then check if the bullets position was in the monster, if the bullet was in the monster the bullet would do its animation and delete itself. i did this because the monster had a lot of empty space in its image. So that worked alright. But when i shot and the bullet passed monster(a)'s blank space and hit monster(b) If i then shot monster(b) monster(a)'s life would go down and if i shot monster(a), monster(b)'s life would go down. What was happening? is there a better way to do this? other than just trimming down the image. it might be worth noting that the monsters were both the same actor and both spawned by the same actor. sorry if i posted this in the wrong spot.
Comments
I'm not sure I understand what's going on. Can you post a picture/video of what's happening? It's hard for me to read your post and understand your issue.
Moved thread to appropriate category.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
That happens becuase you are using an X and Y value and your range of distance is too wide. The empty space is being acknowledged as in the hit zone. Show a picture of your monster. Did you use a custom collision shape?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
We need to see the images and the logic you're using, really. The more information you give the more helpful the responses will be!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
i suck at explaining things but maybe this picture will help. I tried making the X and Y value range narrower but it still happens and no i'm not using a custom collision shape. I doubt anyone knows what's happening but it's worth a try. This is happening to me even when i don't restrict the X and Y, and i used the regular shape of the image. When a bullet skins the top of an actor image (by like half a pixel) and hits another actor image behind it, it switches they're health. I suggest you guys try it. Maybe a problem with GS?
In your picture the bullet is clearly hitting first zombie, so the zombie's life is expected to go down. What is it you're expecting to happen?
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
I made it so the bullet only hits it if its Y is lower than the zombies Y+20. So no its not hitting but it is colliding. (the bullet is suppose to be going over the top)
We really need to see your logic.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Actually i should be asking if an actor that is spawned can effect attributes in a different instance that is also spawned? if so how can i make it so they don't effect each others attributes?
Potentially yes, but in this case it shouldn't.
How are you calculating the zombie's Y location? If you're spawning the zombies, it will be very difficult to get the bullet to correctly ascertain the Y location of the specific zombie it is attacking.
You're unlikely to get a solution without showing us the actual logic you're using, though.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Well i'm actually not using that logic anymore I ended up changing the image size itself to include as little of the empty space as possible. But i still get the problem of zombies taking damage for different zombies when i hit one then switch targets to another zombie. know how to fix that?
How can we answer that without know how exactly you coded it? Why does the image need to be so big? Is there an animation where the zombie image goes into that area? Why aren't you using a custom collision shape?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Well, we'll need to see the logic you're using for that then. You could have done any of a thousand things and may have caused the problem any of a thousand ways.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Alright just never mind Ill figure it out myself. Thanks for the help.