We need some help here at the lab...
I have the multijoy plugin, but would prefer the DBpro original method for two simultaneous joysticks control... Ive attached code, and anyone that can help, it would be greatly appreciated.
what I am trying to accomplish in the code eventually is the main robot will have two arms (each arm controlled by a separate joystick)
for now I am testing by seeing if we can get each joystick to have control over the frame...unfortunately I am not familiar with the control device method...
`H.A.R.M. - ( Heavy Armored Robotic Mech )
`Designed by Christopher S. Johnson AKA: YZ
`Developed for UNITUS at HOLY SCIENTIFIC LABS (all rights reserved) (c) 5/2/2012
SET DISPLAY MODE DESKTOP WIDTH(), DESKTOP HEIGHT(), 32
maximize window
hide mouse
make matrix 1,1000,1000,50,50
randomize matrix 1,20
LOAD IMAGE "ground1.jpg",1
PREPARE MATRIX TEXTURE 1,1,1,1
update matrix 1
LOAD OBJECT "HARM1.x",1
POSITION OBJECT 1,500,50,500
SCALE OBJECT 1,80,80,80
SET OBJECT cull 1,0
TURN OBJECT LEFT 1,180
MAKE CAMERA 1
POSITION CAMERA 1,LIMB POSITION X(1,6),LIMB POSITION Y(1,6),LIMB POSITION Z(1,6)
COLOR BACKDROP 1,rgb(50,50,70)
TURN CAMERA LEFT 1,360
MAKE CAMERA 2
POSITION CAMERA 2,object position x(1),object position y(1)+20,object position z(1)-100
set camera view 2, 10, 10, 300, 300
point CAMERA 2,object position x(1),object position y(1),object position z(1)
global speed# as float
global movement as integer
speed#=0.00
movement=0
SET CONTROL DEVICE INDEX 0
SET CONTROL DEVICE "WingMan Force 3D"
SET CONTROL DEVICE INDEX 1
SET CONTROL DEVICE "WingMan Attack 2"
do
movement=0
if keystate(17)=1 then speed#=curvevalue(-1,speed#,10) : movement=1
if keystate(31)=1 then speed#=curvevalue(1,speed#,10) : movement=1
if keystate(30)=1 then turn OBJECT left 1,1
if keystate(32)=1 then turn OBJECT right 1,1
if keystate(30)=1 then turn CAMERA left 1,1
if keystate(32)=1 then turn CAMERA right 1,1
if JOYSTICK up() =1 then speed#=curvevalue(-1,speed#,10) : movement=1
if JOYSTICK down() =1 then speed#=curvevalue(1,speed#,10) : movement=1
if JOYSTICK left() =1 then turn OBJECT left 1,1
if JOYSTICK right() =1 then turn OBJECT right 1,1
if JOYSTICK left() =1 then turn camera left 1,1
if JOYSTICK right() =1 then turn camera right 1,1
if CONTROL DEVICE Z() =-1 then speed#=curvevalue(-1,speed#,10) : movement=1
if CONTROL DEVICE Z() =1 then speed#=curvevalue(1,speed#,10) : movement=1
if CONTROL DEVICE X() =-1 then turn OBJECT left 1,1
if CONTROL DEVICE X() =1 then turn OBJECT right 1,1
if CONTROL DEVICE X() =-1 then turn camera left 1,1
if CONTROL DEVICE X() =1 then turn camera right 1,1
if movement=0 then speed#=curvevalue(0,speed#,10)
move object 1,speed#
yROTATE OBJECT 1,wrapvalue(object angle y(1)-(mousemovex()/0.8))
xROTATE OBJECT 1,wrapvalue(object angle x(1)-(mousemovey()*0.2))
position object 1,object position x(1),get ground height(1,object position x(1),object position z(1))+2.5,object position z(1)
SET CAMERA TO FOLLOW 1,LIMB POSITION X(1,6),LIMB POSITION Y(1,6)+3,LIMB POSITION Z(1,6)-5,0,-5,-5,1,0
SET CAMERA TO FOLLOW 2,object POSITION X(1),object POSITION Y(1)+30,object POSITION Z(1)-70,0,0,0,1,0
sync
loop
CSJ 7000