Sign in to follow this  
Followers 0
dantay9

ProSpeed Help

5 posts in this topic

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!


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

Thanks JPAM. Your script is so cool. If only it was open sourced. O well. That won't happen.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

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?


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0