make this code work with my hover.x object and the arrow keys?
`Create a Spaceship structure
Type SpaceShip
`actual x/y coords
x
y
`'sliding' x/y coords
xs
ys
`Current YAW (or yrotation)
dir
endtype
`Make ourselves a spaceship!
Andromida as Spaceship
Do
Goto Move_Player
Goto Andromida_Player_Control
Loop
`Player junk
Move_Player:
`This is updates the ships position by its thrust
Andromida.x = Andromida.x + Andromida.xs
Andromida.y = Andromida.y + Andromida.ys
Return
`Now the nitty gritty math stuff
`Grab the Input and thrust accordingly
Andromida_Player_Control:
`thrust is held in xs and ys
if upkey() = 1 then
Andromida.xs = Andromida.xs + cos(wrapvalue(Andromida.dir))
Andromida.ys = Andromida.ys - sin(wrapvalue(Andromida.dir))
endif
Return
ShadowHarlequin aka Cyclone
00taylorkirkgre@westsomerset.somerset.sch.uk
fathamster@37.com