| Yoko http://forum.yoko.com.ua/ |
|
| Go To Place http://forum.yoko.com.ua/viewtopic.php?f=1&t=261 |
Page 1 of 1 |
| Author: | Fonzy [ 2004-05-05 02:17:02 ] |
| Post subject: | Go To Place |
I need a script with a function that, given X and Y coordinates of the world, makes the character move to them. Of course the problem is avoid the obstacles. Anyone has something like that? |
|
| Author: | Lord Ruslan Nightmare [ 2004-05-06 11:11:49 ] |
| Post subject: | |
There is two ways: 1) Difficult, complex script with intelligence obstacle-avoiding system. Also large 2d array with passability may be used... 2) Use bulid-in client pathfinding. Use special formula to unproject world's tile coords. to uo window coords and make a right double click (of course, this will allow you to go only to tile you see on your screen) It is good idea to combine thease methods (if script fails to find the way to destination point - it will calculate some waypoints and use pathfinding to go across them (if desination tile is not on your screen, otherwise it will just go to destination)). |
|
| Author: | Spirito [ 2004-05-07 09:02:41 ] |
| Post subject: | |
like this? Code: sub Move(x,y) |
|
| Author: | Fonzy [ 2004-05-08 18:45:05 ] |
| Post subject: | |
I'm interested in what u wrote, but i think the code has been modified by the forum.. it's unusable. Could you send me it via mail? It's robyfonzypubbl@yahoo.it. Thanks. |
|
| Page 1 of 1 | All times are UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|