Jump to content

Recommended Posts

Posted

I am trying to make a game as a learning experience, but I don't know what I am doing wrong.

#include <ProSpeed30.au3>
$width = 860
$height = 488
GUICreate("", $width, $height)
GUISetState()
$Background = BackgroundScroll(@ScriptDir & "\images\Background.bmp", 0, 0, -1, 1)
$Mask = LoadImage(@ScriptDir & "\images\mask.gif", 0, 0, $width, $height, 4)
$Sprite1 = LoadSprite(@ScriptDir & "\images\Sprite.bmp")
$Sprite = Sprite($Sprite1, 1, 124, 32, 32, 32, 1, 1, 1, 200, 405)
SetSpriteSpeed($Sprite, 3, 0)
Scroll_Stop()
Do
 Sleep(1)
Until GUIGetMsg() = -3

I love this Prospeed UDF by JPAM. Thanks!

Posted

something like this;

#include <ProSpeed30.au3>

$width = 860
$height = 488
GUICreate("", $width, $height)
GUISetState()

$hdc = GetHDC()

$Background = BackgroundScroll(@ScriptDir & "\images\Background.bmp", 0, 0, -1, 1)
$Mask = LoadFileImage(@ScriptDir & "\images\mask.gif")
$Sprite1 = LoadSprite(@ScriptDir & "\images\Sprite.bmp")

$Sprite = Sprite($Sprite1, $hdc, 0, 0, 32, 32, 32, 1, 1, 200, 405)
SetSpriteSpeed($Sprite, 3, 0)
Scroll_Stop()

Do
Sleep(1)
Until GUIGetMsg() = -3
Posted

I've tried your script and it works, but the picture that is loaded is black most of the time and then, like once a second, it flashes to the picture loaded from the file. How do I fix this?

Posted

you have to set the right amount of frames from the sprite picture

Sprite($S_Spriteplane, $S_Destination, $S_offsetX, $S_offsetY, $S_WIDTH, $S_HEIGHT, $S_FRAMES, $S_START_FRAME, $S_FRAME_SPEED, $S_posX, $S_posY)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...