Hello again ... I know what needs to be done to get the groupings to work efficiently and effectively now.
Problem is, once again, I don't know something needed to make it happen.
Any math wiz out there care to tell me:
How to Test the Distance between the Player Character and the Active Object Nearest to him ?
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
Deleted User
26th May, 2008 at 18:28:52 -
X POSITION OF ENEMY
MINUS
X POSITION OF PLAYER < 50 PIXELS - SHOOT BULLET
Something like that. If left decreases the x position, and right increases it that should work.
square root((X("Player") - X("Enemy"))² + (Y("Player") - Y("Enemy"))²) < Distance you need in pixels
:
Player - Look in direction of enemy
Player - Shoot an object
My signature is never too big!!!
Peblo Custom ratings must be 50 characters or less
Registered 05/07/2002
Points 185
27th May, 2008 at 15:52:00 -
Yeah you actually have to use math in games, not pure conditions. Joe has the right answer.
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath
Thank you guys. I'll have to test the methods and see if they work for what I need.
Btw, whoever said that I need it for shooting ?
I simply need it to determine which object within a grouping of objects is to be acted upon by the group code.
I have a theory that this is a way to keep the TGF1 grouping system from glitching up when used with certain other code.
If you think you have a better method based upon what I have just said, then please add it here
I'm hoping for a solution customised to the situation. Thank you guys though. Matt and Joe, I really do appreciate the help.
Especially you Joe, cause the Math formula is what I'm looking for.
Here's my code. http://www.mediafire.com/?mmhtxinkmgn If you would be kind enough to form an exact solution, you'd make me and whoever else that happens upon this problem, very happy. Thanks Again !
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?