Sorry for posting so much...

BlitzPlus Forums/BlitzPlus Beginners Area/Sorry for posting so much...

Just wondering, is there any way to - in a space game - make a bullet's starting point be a certain starting point on a ship without giving it a new point for each possible starting frame?


bullet.bullet = New bullet
		
		bullet\frame = (ship\frame - (ship\rotations * (ship\framehunk - 1)))
		bullet\dx# = xSinTable#(bullet\frame)
		bullet\dy# = yCosTable#(bullet\frame)
		bullet\image = bulletimage
		bullet\x# = ship\x#
		bullet\y# = ship\y#




That's my code so far. The ship has a special gun where I want the bullet to be launched from (and the ship is offcenter in the image to make it look better - but never mind that) so just "bullet\x# = ship\x#" wouldn't work.

This might be confusing, so here's the sum-up:

How can I get a ship to launch a bullet from a specific part of the ship, no matter which way the ship is facing?