|
-
Mar 7th, 2002, 03:02 PM
#1
Ranged Fire
I am making a game that uses 50*50 pixels(rpg) where a character walks around(so far). He needs to be able to shoot at things, based on the range of his rifle. I have determined how to make a line travel from him to the enemy. But, I need to determine the range at what it is.
i.e.
if it travels up 4 x's, and 4 y squares, then the range should be 4.
if it travles across 4 x's, and 0 y's, then the range is 4.
if it travels up 3 x's, and 2 y's, then the range should be 3.
anybody have any help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|