Hello everyone,
I have successfully made a Commandos Style game in vb that has one level(working on it). The player has the abillity to pick up weapons and such. But, when the player clicks the gun, i want the gun icon to be displayed as long as the cursor is within 600 Twips of the Player. Here what i have but it doesnt work.
nopistol.ico is a gun picture with a cross over it showing that the user cant shoot here. But if the cursor is within 600 twips of the player, it shows the pistol icon.VB Code:
Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) Dim CX, CY As Integer Dim CursorPosition As PointAPI GetCursorPos CursorPosition CX = CursorPosition.x CY = CursorPosition.y If HoldSilPistol = True And CX <= MainFigure.Left - 600 Then Image2.MouseIcon = LoadPicture(App.Path & "\data\images\Entities\nopistol.ico") ElseIf HoldSilPistol = True And CX >= MainFigure.Left + MainFigure.Width + 600 Then Image2.MouseIcon = LoadPicture(App.Path & "\data\images\Entities\nopistol.ico") Else Image2.MouseIcon = silpistol.Picture End If End Sub
Any ideas would be appreciated
Phreak




Reply With Quote