The Daily Click ::. Forums ::. Klik Coding Help ::. How would you do this Look towards an X,Y variable point instead of at another object?
 

Post Reply  Post Oekaki 
 

Posted By Message

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
21st September, 2007 at 12:40:23 -

Hello, today's burning question is sort of along the lines of what's mentioned in the "Last Known Pursuit" article here on TDC. In it, the article mentions storing the last known X and Y position of the player in an enemy's alt variables, but doesn't say just how that enemy should use those to move to that specific point (coding-wise).

What I have now is a small invisible active picture that positions itself according to these 2 values, and then the enemy is set to always look towards that invisible box. But, I'd really like it if I could just have the enemy follow its 2 internal alt X, Y values instead and not have to rely on my crap method.

I've tried looking in the direction events in MMF1.5 and couldn't find anything that said "look in the direction of an X,Y position", only "look in the direction of (another object)". Any suggestions?

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
21st September, 2007 at 15:53:01 -

Use the direction calculator extension. The angle calculator also can do it, plus any other degree'd movement.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

waffleton



Registered
  20/04/2007
Points
  794
21st September, 2007 at 15:54:02 -

The thief speaks the truth!

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
22nd September, 2007 at 06:42:22 -

Great, I have the Advanced Direction Calculator already so I'll try that. Thanks!

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!
   

Post Reply



 



Advertisement

Worth A Click