I have the X,Y and Z positions of an object stored like this:
if object exist(1)=1
objangy1#=object angle y(1)
if collisionobj1#=2
if object collision(1,2)
yrotate object 1,wrapvalue(objangy1#+180)
collisionobj1#=3
endif
endif
if collisionobj1#=3
if object collision(1,3)
yrotate object 1,wrapvalue(objangy1#+180)
collisionobj1#=2
endif
endif
move object 1,-0.3
rem make sure he's at the right height
Thug1X#=object position x(1)
Thug1Z#=object position z(1)
Thug1Y#=get ground height(1,Thug1X#,Thug1Z#)
position object 1,Thug1X#,Thug1Y#,Thug1Z#
endif
but when I change them to arrays as below it doesn't work:
if object exist(1)=1
objangy1#=object angle y(1)
if collisionobj1#=2
if object collision(1,2)
yrotate object 1,wrapvalue(objangy1#+180)
collisionobj1#=3
endif
endif
if collisionobj1#=3
if object collision(1,3)
yrotate object 1,wrapvalue(objangy1#+180)
collisionobj1#=2
endif
endif
move object 1,-0.3
rem make sure he's at the right height
ThugPos(1,1)=object position x(1)
ThugPos(1,3)=object position z(1)
ThugPos(1,2)=get ground height(1,ThugPos(1,1),ThugPos(1,3))
position object 1,ThugPos(1,1),ThugPos(1,2),ThugPos(1,3)
endif
I have declared the array at the top using
I have replaced all the instances of Thug1X#, Thug1Z# and Thug1Y# in the program, but whenever I do this, the thug just freezes when he turns round and doewsn't walk any further.
Can someone help please
Am I the only one here who's really confused?