@Spline
Try this:
sync rate 60
sync on:sync
autocam off
joy start
joylast=joy last()
dim x(joylast)
dim y(joylast)
dim z(joylast)
dim dy(joylast)
dim jump(joylast)
for i=0 to joylast
if joy exist(i)
make object cube i+1,50
endif
next i
for i=0 to joylast
if object exist(i+1)
x(i)=0
y(i)=-100
z(i)=300+150*i
position object i+1,x(i),y(i),z(i)
color object i+1,rgb(rnd(255),rnd(255),rnd(255))
endif
next i
position camera 0,250,-200
point camera x(joylast/2),y(joylast/2)+50,z(joylast/2)
repeat
for i=0 to joylast
if joy exist(i)
joy poll i
if joy x(i)<0 then dec x(i),5
if joy x(i)>0 then inc x(i),5
if joy y(i)<0 then inc z(i),5
if joy y(i)>0 then dec z(i),5
if joy any button(i)<>0 and jump(i)=0 then dy(i)=15:jump(i)=1
if jump(i)=1
inc y(i),dy(i)
dec dy(i)
if dy(i)<-15 then dy(i)=0:jump(i)=0
endif
position object i+1,x(i),y(i),z(i)
text object screen x(i+1),object screen y(i+1),"J"+str$(i)
endif
next i
text 0,0,"Use your joypads to move the blocks"
text 0,20,"Press any key to quit."
sync
until inkey$()<>""
A small fix, just added one more "IF"
@aristid
Yeah, I think TGC won't change the joystick commands anymore. Specially now there's a specific plugin for that. Maybe when people here want to develop a multiplayer street fighter or double dragon clone, and they see it's not possible with the built in joystick commands, they will buy it.
Don't get me wrong, I'm not forcing anyone to buy it. With some effort you can use DLL calls and an external DLL like GLFW, or maybe study the DirectInput API to use it directly (painful...).
MultiJoy Plugin is just an easier and much more practical solution.