Upgrade!!
Make object cube 1,2 : Position object 1,-3,-25,0 : Color object 1,rgb(255,255,0)
Make object cube 2,2 : Position object 2,3,-25,0 : Color object 2,rgb(0,255,0)
Make object cube 3,50 : Position object 3,0,-50,0
health=1000
healthp=1000
ghost_power=100
ghost_powerp=100
game_speed#=0.01
p=0
p2=0
SYNC ON
SYNC RATE 0
Do
Set cursor 0,0
Print "1P HP :";health : Print " 2P HP :";healthp
Print "1P GP :";ghost_power : Print " 2P GP :";ghost_powerp
If Keystate(30)=1 then move object left 1,0.5
If Keystate(32)=1 then move object right 1,0.5
If Keystate(17)=1 then move object 1,object angle z(1)+0.5
If Keystate(31)=1 then move object 1,object angle z(1)-0.5
If leftkey()=1 then move object left 2,0.5
If rightkey()=1 then move object right 2,0.5
If upkey()=1 then move object 2,object angle z(2)+0.5
If downkey()=1 then move object 2,object angle z(2)-0.5
If object collision(1,3) then p=1 else p=0
If object collision(2,3) then p2=1 else p2=0
If p=0 then move object down 1,1
If p2=0 then move object down 2,1
If object collision(1,2) and Keystate(34)=1
Ghost object on 1
ghost_power=ghost_power-2
healthp=healthp-1
else
ghost object off 1
endif
If object collision(2,1) and keystate(25)=1
Ghost object on 2
ghost_powerp=ghost_powerp-2
health=health-1
else
ghost object off 2
endif
If Keystate(33)=1 then ghost_power=ghost_power+1
If Keystate(38)=1 then ghost_powerp=ghost_powerp+1
If ghost_power<0 and object collision(1,2) and keystate(34)=1 and Attack1=0 then health=health-1 : Attack1=1
If ghost_powerp<0 and object collision(2,1) and keystate(25)=1 and Attack2=0 then healthp=healthp-1 : Attack2=0
if keystate(34)=0
Attack1=0
endif
if keystate(25)=0
Attack2=0
endif
If ghost_power<0 then ghost_power=0
If ghost_powerp<0 then ghost_powerp=0
If ghost_power>500 then ghost_power=500
If ghost_powerp>500 then ghost_powerp=500
If health<0 then Print "Player 2 wins!"
If healthp<0 then Print "Player 1 wins!"
If p=0 then Wait 1000 : Cls : Print "Player 2 wins!"
If p2=0 then Wait 1000 : Cls : Print "Player 1 wins!"
Sync
Loop
Now its funner try it out
peace
David