H!
Because i'm busy with a internet game I need/want some other player movement. (movement commands)
The player only can do this
up
- right
- left
down
- right
- left
right
- up
- down
left
- up
- down
and stop when all keys are up.
I send the movement options to the server,
so I know if the player is going up (uu) or up-left (ul) etc.
I changed the code so you can see what I mean.
And my question is:
"is there a smaller/better code for this?"
Thanks,
Because i'm busy with a internet game I need/want some other player movement. (movement commands)
The player only can do this
up
- right
- left
down
- right
- left
right
- up
- down
left
- up
- down
and stop when all keys are up.
I send the movement options to the server,
so I know if the player is going up (uu) or up-left (ul) etc.
I changed the code so you can see what I mean.
And my question is:
"is there a smaller/better code for this?"
While Not KeyHit(1) ;up If KeyDown(200) And KeyDown(208)<>1 Then If KeyDown(200) And KeyDown(205)<>1 And KeyDown(203)<>1 Then pldo$="uu" DebugLog pldo$ EndIf If KeyDown(205) Then pldo$="ur" DebugLog pldo$ EndIf If KeyDown(203) Then pldo$="ul" DebugLog pldo$ EndIf EndIf ;down If KeyDown(208) And KeyDown(200)<>1 Then If KeyDown(208) And KeyDown(205)<>1 And KeyDown(203)<>1 Then pldo$="dd" DebugLog pldo$ EndIf If KeyDown(205) Then pldo$="dr" DebugLog pldo$ EndIf If KeyDown(203) Then pldo$="dl" DebugLog pldo$ EndIf EndIf ;left If KeyDown(203) And KeyDown(205)<>1 And KeyDown(208)<>1 And KeyDown(200)<>1 Then If KeyDown(203) Then pldo$="ll" DebugLog pldo$ EndIf EndIf ;right If KeyDown(205) And KeyDown(203)<>1 And KeyDown(208)<>1 And KeyDown(200)<>1 Then If KeyDown(205) Then pldo$="rr" DebugLog pldo$ EndIf EndIf Wend
Thanks,