6105 Posted June 4, 2009 Posted June 4, 2009 (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 June 5, 2009 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]
oMBRa Posted June 4, 2009 Posted June 4, 2009 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
oMBRa Posted June 4, 2009 Posted June 4, 2009 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
Developers Jos Posted June 4, 2009 Developers Posted June 4, 2009 (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 June 4, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Developers Jos Posted June 4, 2009 Developers Posted June 4, 2009 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 actionSeems 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. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
6105 Posted June 4, 2009 Author Posted June 4, 2009 ThanksALL [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]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now