i'm trying to get this multiplayer thing figured out with a simple game for two players where you can move a circle around the screen. But i cant seemto get it to work - this is the code:
do
if game=0
perform checklist for net players
if checklist quantity()=2
game=1
endif
endif
if upkey()=1 then dec myypos,1
if downkey()=1 then inc myypos,1
if leftkey()=1 then dec myxpos,1
if rightkey()=1 then inc myxpos,1
if myxpos 640 then myxpos=0
if myypos 480 then myypos=0
if game=1
get net message
if net message exists()=1
tempcoords$=net message string$()
for i = 1 to len(tempcoords$)
if mid$(tempcoords$,i)=":" then breakpoint=i
next i
yourxpos=val(left$(tempcoords$,breakpoint-1))
yourypos=val(right$(tempcoords$,breakpoint+1))
endif
coords$ = str$(myxpos)+":"+str$(myypos)
send net message string 0,coords$
endif
sprite 1,myxpos,myypos,1
sprite 2,yourxpos,yourypos,1
sync
loop
When player 2 enters - their circle does move on the plr 1's screen once but after that, nothing happens - any ideas?
thx.