I've set up the wizard-based shooting script in my game, and I'm trying to find a way to use it to let the player aim and shoot with the mouse, a la Abuse.
I've been trying to use the
mouse input sample script to make crosshairs that the player can move with the mouse, but the script doesn't work. I get the error "Object Variable or With Block variable not set" when I include this line:
HostObj.SinkObjectEvents CurrentDisplay, "Display"
What's going on? Here's the rest of the script:
Sub CurrentDisplay_MouseMove(Button, Shift, X, Y)
With ProjectObj.GamePlayer
ProjectObj.GamePlayer.rMap.SpriteDefs("aim").X = X + .MapScrollX - .rMap.ViewLeft
ProjectObj.GamePlayer.rMap.SpriteDefs("aim").Y = Y + .MapScrollY - .rMap.ViewTop
End With
End Sub
Also, I don't understand the point of the initialization script area of this sample. It has a connecteventsnow line when there's already a connecteventsnow line in the runtime script. Is this sample from an older version of the game maker? Am I missing something there?
Thanks in advance.