Thank you very much!
so basically from the tutorial I use this code, to modify the waypoints
function modwp()
ai make memblock from waypoints 1,0
wp = memblock dword(1,0)
edge = memblock dword(1,4)
wpStart = 8 : wpEnd = wpStart + (wp * 12) - 1
edgeStart = wpEnd + 1 : edgeEnd = get memblock size(1) - 1
for n = edgestart to edgeend step 12
rem *** block inward ***
if memblock dword(1,n)=13 and memblock dword(1,n+4)=14 then write memblock float 1,n+8,99999999999
if memblock dword(1,n)=8 and memblock dword(1,n+4)=11 then write memblock float 1,n+8,99999999999
if memblock dword(1,n)=13 and memblock dword(1,n+4)=11 then write memblock float 1,n+8,99999999999
if memblock dword(1,n)=8 and memblock dword(1,n+4)=14 then write memblock float 1,n+8,99999999999
next n
ai make waypoints from memblock 0,1
endfunction
but before modify I check each index of waypoints from this one. the position would not be so precise but you'll get a picture of overall waypoints in simulation and you can see its position.
for n=wpstart to wpend step 12
wppos(0,wpindex) = memblock float(1,n)
wppos(1,wpindex) = memblock float(1,n+4)
ink RGB(0,0,0),RGB(0,0,128)
set cursor wppos(0,wpindex)+550,wppos(1,wpindex)+375
print wpindex
inc wpindex
next n
wpindex = 0
So then, I check my result by this, to print if my condition is right and the cost of edge has changed. by printing it out in the main loop.
for n = edgestart to edgeend step 12
if memblock dword(1,n)=13 and memblock dword(1,n+4)=14 then print memblock dword(1,n)," ",memblock dword(1,n+4)," ",memblock float (1,n+8)
if memblock dword(1,n)=8 and memblock dword(1,n+4)=11 then print memblock dword(1,n)," ",memblock dword(1,n+4)," ",memblock float (1,n+8)
next n
also with this one to check how the each edge is performing (first 10 edgess)
for n = edgestart to edgestart+120 step 12
print memblock dword(1,n)," ",memblock dword(1,n+4)," ",memblock float (1,n+8)
next n
I have done exactly for my idea to find an index and change the cost for each edge to make a one way track, but it seems not to work out. T_T