 |
| View previous topic :: View next topic |
| Author |
Message |
RenRu Sakamari Newbie
Joined: 04 Aug 2005 Posts: 20 Location: Spokane, WA
|
Posted: Aug 4th, 2005 01:27 PM Post subject: Moving Something |
|
|
Hi, I'm having problems, and I don't even know if you can do this with VB.NET but I still want to find out.
Ok, I am making a game where you move a 2d... maybe a dot for example around the screen by using the arrow keys, but I don't know how to make it controllable by the arrow keys, could someone helpp me or give me a tip or the code to do that? Thanks.
Cameron (RenRu) _________________ BLA<>,<> |
|
| Back to top |
|
RoofRabbit Regular

Joined: 06 Jul 2005 Posts: 95 Location: Lenoir, NC USA
|
Posted: Aug 5th, 2005 11:10 PM Post subject: |
|
|
That would be answered better in the vb.net forum. _________________ Website - [link] |
|
| Back to top |
|
Uarepoo2 Newbie
Joined: 02 Jul 2006 Posts: 4
|
Posted: Jul 6th, 2006 07:45 AM Post subject: |
|
|
If Player(MyIndex).MovingH = NO And Player(MyIndex).MovingV = NO Then
If Player(MyIndex).Dir = DIR_DOWN Then
Call SetPlayerDir(MyIndex, DIR_LEFT)
If d <> DIR_LEFT Then
Call SendPlayerDir
End If
ElseIf Player(MyIndex).Dir = DIR_LEFT Then
Call SetPlayerDir(MyIndex, DIR_UP)
If d <> DIR_UP Then
Call SendPlayerDir
End If
ElseIf Player(MyIndex).Dir = DIR_UP Then
Call SetPlayerDir(MyIndex, DIR_RIGHT)
If d <> DIR_RIGHT Then
Call SendPlayerDir
End If
ElseIf Player(MyIndex).Dir = DIR_RIGHT Then
Call SetPlayerDir(MyIndex, DIR_DOWN)
If d <> DIR_DOWN Then
Call SendPlayerDir
End If
End If
End If
End If
End Sub
Sub SetPlayerDir(ByVal Index As Long, ByVal Dir As Long)
Player(Index).Dir = Dir
End Sub
' Position
Map As Long
x As Byte
y As Byte
Dir As Byte |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|