S
Showtime
Guest
hey, so im making a shmup and i want one of the shot types to be a thick laser that stops at an enemy. ive figured out i can do this by scaling its yscale, but im having a problem where it seems it doesnt scale the mask too? im not sure what the problem is, ive run countless tests to try and find the problem, it seems to scale the mask when i scale it UP (for example image_yscale=2) but not when i scale it DOWN (like image_yscale=0.5).
furthermore when two enemy objects are at the same x possition the laser has so far (depending on what solutions ive tried to use, right now its the last mentioned) collided with both (regardless of the lasers yscale), only hit the ones in the back (again regardless of scaling) which is the opposite of what i want, or - and this is what has me most confused - the test enemies i have are arranged in a circle for optimal testing and the laser acts correctly on the RIGHT side of the circle, it hits the front enemies and works great, but on the LEFT side it only hits the ones in the back, and in the middle it seems to be really inconsistent how it behaves... it has nothing to do with coordinates as ive tried to move their spawner to different spots but its still right=right and left=wrong... ive been at this for days now and i really dont know how to fix it...?
if its worth mentioning im using game maker 8 actually
heres a demonstration (the text is their "hp") (the coloring defects are because of the gif formatting). notice how ive even shrunk the laser smaller that i want it to be and so that it doesnt touch any of the objects...
please help and thank you for your time fhjdkfjghjkdfhdj
EDIT: by the way, when the laser gets long in the gif thats because ive set it so that it only scales in the collision event. however now that i think about it i havent set any event or script to scale it back, could this be something useful to know...? i mean its supposed to scale back but thinking of it idk why it does...
EDIT EDIT: i realised the reason it scales back is because the player (the red dot) is creating it every step, and every step (or every second step depending how you see it) the laser is set to destroy itself. could this maybe be why the collision is messing up? i still dont understand why it only works on the right side...
furthermore when two enemy objects are at the same x possition the laser has so far (depending on what solutions ive tried to use, right now its the last mentioned) collided with both (regardless of the lasers yscale), only hit the ones in the back (again regardless of scaling) which is the opposite of what i want, or - and this is what has me most confused - the test enemies i have are arranged in a circle for optimal testing and the laser acts correctly on the RIGHT side of the circle, it hits the front enemies and works great, but on the LEFT side it only hits the ones in the back, and in the middle it seems to be really inconsistent how it behaves... it has nothing to do with coordinates as ive tried to move their spawner to different spots but its still right=right and left=wrong... ive been at this for days now and i really dont know how to fix it...?
if its worth mentioning im using game maker 8 actually
heres a demonstration (the text is their "hp") (the coloring defects are because of the gif formatting). notice how ive even shrunk the laser smaller that i want it to be and so that it doesnt touch any of the objects...
please help and thank you for your time fhjdkfjghjkdfhdj
EDIT: by the way, when the laser gets long in the gif thats because ive set it so that it only scales in the collision event. however now that i think about it i havent set any event or script to scale it back, could this be something useful to know...? i mean its supposed to scale back but thinking of it idk why it does...
EDIT EDIT: i realised the reason it scales back is because the player (the red dot) is creating it every step, and every step (or every second step depending how you see it) the laser is set to destroy itself. could this maybe be why the collision is messing up? i still dont understand why it only works on the right side...
Last edited by a moderator: