I am attempting this:
gridx = 40 //grid world size X
gridz = 40 //grid world size Z
nde_rad# = .25
nde_dia# = nde_rad#*2 //size of a node
gwsx = round(gridx/nde_dia#)
gwsz = round(gridz/nde_dia#)
dim pf_grid[gwsx*gwsz,1] //create array
spx# = -20.00 //starting pt x
spz# = -20.00 //starting pt z
for x = 0 to gwsx
for z = 0 to gwsz
wrldPt = CreateVector3( spx#+(x*nde_dia#+nde_rad#), 0, spz#+(z*nde_dia#+nde_rad#) )
walkable = pf_collision_detection( wrldPt )
pf_grid[gwsx+gwsz,0] = wrldPt
pf_grid[gwsx+gwsz,1] = walkable
next z
next x
When I go to look for the vector it says it does not exist. When I try to print the array like so Print(GetVector3X(pf_grid[1,0])) I get an error message the vector doesn't exist. I also only get a 0 if I just try to print pf_grid[1,0] . I get no error message when I run the code.
I've also tried CreateVector3() then SetVector3() without success.
Another weird thing is the function pf_collision_detection uses the vector and I get no error message during the load up.