View Single Post
  #45 (permalink)  
Old 07-06-2009, 05:30 PM
enonod's Avatar
enonod enonod is offline
Basic4ppc Veteran
 
Join Date: Oct 2007
Location: U.K.
Posts: 324
Default

Yes, except that this is only good for getting data out that was previously put in say, manually. using it to put in, puts the same data in x1,x2,x3 etc.

That trivial point aside, I see that there seems little in it either way.

To obtain x,y pairs I have...

Code:
Sub Globals
    cwTurn=
0
    
Dim cwWaypoints(8)
    
Dim arr(0)
End Sub

Sub App_Start
    cwWayPoints(
0)= 49 'x1
    cwWayPoints(1)=1 'y1
    cwWayPoints(2)= 271 'x2
    cwWayPoints(3)=1 'y2
    cwWayPoints(4)=271 'x3
    cwWayPoints(5)=319 'y3
    cwWayPoints(6)=49 'x4
    cwWayPoints(7)=319 'y4

'Save the data with the sprite    
    cw.DataArray=cwWayPoints()
...
End Sub

Sub gw_CollisionDestination
    cw.direction = 
Int(cwTurn/2)*90 Mod 360
    cwTurn =(cwTurn+
2Mod 8
    arr()=cw.DataArray
    cw.DestinationX=arr(cwTurn)
    cw.DestinationY=arr(cwTurn+
1)
End Sub
Everything you have provided works well, it is only my expectations from what is available in other languages.
__________________
You never stop learning until you die.
Sometimes I think I am dead.
Sometimes others think I am dead!
Homesite: http://www.don-simmonds.co.uk for Libyan Mural

Device:Viewsonic VPad7, Android 2.2.2
Reply With Quote