The function tile_to_pos is entirely made by me,maby thats why it doesnt work as it should I found a solution but it'll make my script useless. To put all node possitions in 2 arrays. Node 1 ... node_pos_x[node1] = 1 , node_pos_y[node1] = 1;
It'll make my script useless because the whole purpose of it should be to act dinamicly. You put glength & gwidth , you put tsize (grid length,width and tile size) and you have a pathfinding algorithym that'll adapt to the changes made. If I imput all the node possitions by hand it'll limit the size of the grid to whatever number I set it to. If I want to change from 50x50 grid to 49x49 grid I'll have to rearrange 1/10 of the arrays and this would be nececary for every level I create. Not to mention it takes time to find the correct values in the array to change,and additional time to rearrange the rest of the array to fit my new grid.
Is there a math forum or something over the net? I think I should ask there...


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201