I am making a shooting game but i cant make the right click button to shoot. How can i shoot and make the right mouse button the activate (w/e you call it)
tia
Printable View
I am making a shooting game but i cant make the right click button to shoot. How can i shoot and make the right mouse button the activate (w/e you call it)
tia
VB Code:
If Button = 1 Then 'means if mouse button = left then If Button = 2 Then 'means if mouse button = right then
thanks... i keep on getting a compile error - Block i without end if
If you have more then on eline after the IF...you have to end it with End if...
If Button = 1 Then
'means if mouse button = left then
...more lines
....more lines
end if
If Button = 2 Then
'means if mouse button = right then
...more lines...
,,,...more line....
end if
ok thanks but it doesnt solve my shooting problem.
(yes i solved the compile error after i saw that i had 2 end if's)
What he's saying is that the problem isn't in determining the right mouse button, but in that you've got an unclosed block somewhere. You'll get the error you mention if you have an If without an End If, or a With without an End With, or a Select without an End Select. It could be anywhere in the routine it craps out on, not necessarily on the line it points you to.
I'm not sure anymore if i understand your problem anymore....do you still have a compile error...or is the code just not workin....have you put the code in the...
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
End Sub
...event????
yeah i solved that after i posted that but i want to shoot but i dont know how.
You have to tell me more about how you want the shooting too look like. Is it a 2D game...Scrollong game??? Etc...
Look at this in the mean time...
http://www.vbforums.com/showthread.p...hreadid=211059
Or maybe this would help you....
http://www.vbforums.com/showthread.p...hreadid=207760
ok.... ill post what i want my game to be like... (it is some of teh discreption)
I am looking for an online multiplayer 2-dimensional game. The package will include a main server, a sub-server, and a client.
The main server will store account information and broadcast remote announces/tells to the other servers.
The sub-servers will store all of the game information, and will check user/password combinations from clients to the main server. The sub-server will only function if it is connected to the main server.
For more information please go to hvpb.com and download the game, I want my game to be better graphics and less lag. I want my game to be the same idea as that game (lvls, splats, eq and other things to)