Sign in to follow this  
Followers 0
6105

how to write corectly this code?

6 posts in this topic

#1 ·  Posted (edited)

;IF x<0 and y<0 send("{NumPad3}"); move Down-Right
;IF x>0 and y<0 send("{NumPad6}"); move Right
;IF x>0 and y<0 send("{NumPad9}"); move Up-Right
;IF x<0 and y>0 send("{NumPad1}"); move Down-Left
;IF x>0 and y>0 Send("{NumPad3}"); move Left
;IF x>0 and y>0 Send("{NumPad7}"); move Up-Left

Edited by toader

[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Share this post


Link to post
Share on other sites



closest can have different meaning:

1)the shortest hypotetical straight line that connect point A (a yellow pixel ) to point B ( the pig )

2)the shortest walkable path from Point A to point B

Share this post


Link to post
Share on other sites

search every yellow pixel and store the position (X, Y coordinates) in one array, then find Pig's coordinates, then calc for each pixel the shortest distance (between pixel and pig) with this formula: Sqrt((X1-X2)² + (Y1-Y2)²), and choose the clostest one, and so on.

the second option is A* Star pathfinding algorithm, google it for more informations

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Where have I been unclear to you you about not opening Multiple threads on the same subject? I think I have been pretty clear about this so why this new thread?

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

this is not, old topic is finished, it was a question of how to make a script and I respond to it very well now I have another question entirely and use only 5 points from the figure in order to show movement in action

Seems we differ in our opinions here. I let it go for now, but you haven't had a great start on these forums and don't see much improvement yet.

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

ThanksALL :D


[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0