iZafiro Posted June 20, 2007 Share Posted June 20, 2007 Hello. I was looking at the demos for this UDF and DLL, and it REALLY WORKS GREAT! WOW. :shocked:WOWWOW. :shocked:WOW WOW WOW. I can't say anything else other than WOW. However, the UDF or DLL (I'm not so sure which one) doesn't really work on my computer I've downloaded the latest version of the DLL (on your first post) and put it in C:\WINDOWS\system32\Prospeed.dll I've also downloaded the latest version of your superb UDF (as seen in your demos) and put it in C:\Program Files\AutoIt3\Include\Prospeed.au3 and C:\Program Files\AutoIt3\beta\Include\Prospeed.au3 However, when I put Lakes' bees example in SCiTE and try to run it, C:\Testing\d.au3(25,49) : ERROR: Background() called with wrong number of args. Background(@scriptdir & "\Hintergrund.jpg", 0, 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\beta\Include\Prospeed.au3(387,64) : REF: definition of Background(). Func Background($S_FILE, $S_POSX, $S_POSY, $N_WIDTH, $N_HEIGHT) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Testing\d.au3 - 1 error(s), 0 warning(s) comes out through the error console. Ditto with Beta Run and Beta Compile. Even if I press Continue Anyway (while compiling), the .exe will still give me the error. Am I doing anything wrong? Link to comment Share on other sites More sharing options...
jpam Posted June 20, 2007 Author Share Posted June 20, 2007 (edited) change this line; Background(@scriptdir & "\Hintergrund.jpg", 0, 0) to this; Background(@scriptdir & "\Hintergrund.jpg", 0, 0, 800, 400) they are the bitmap x and y size its better to put the prospeed.dll in the scriptdir Regards jpam Edited June 20, 2007 by jpam Link to comment Share on other sites More sharing options...
StNick Posted June 25, 2007 Share Posted June 25, 2007 I've added two functions I need for my project: #CS MoveSpriteWithTable syntax : MoveSpriteWithTable($S_Alias, TABLE) Note : $S_Alias = user defined string of the sprite created by function Sprite() TABLE = String with X- and Y-Positions in the format "X1 Y1 X2 Y2 etc.." Example: MoveSpriteWithTable($Sprite, "0 0 100 0 100 100 0 100") Would move $Sprite in a square #CE Func MoveSpriteWithTable($S_Alias, $S_DATA) $S_DATA = StringSplit($S_DATA, " ") Local $S_STRUCTs = "" For $i = 1 To $S_DATA[0] $S_STRUCTs &= "short;" Next $S_STRUCT = DllStructCreate($S_STRUCTs) For $i = 1 To $S_DATA[0] DllStructSetData($S_STRUCT, $i, $S_DATA[$i]) Next MsgBox(0, "", DllStructGetPtr($S_STRUCT)) DllCall($S_DLL, "long", "MoveSpriteWithTable", "long", $S_Alias, "long", DllStructGetPtr($S_STRUCT), "long", $S_DATA[0] /2, "long", 0, "long", 0, "long", 1) $S_STRUCT = 0 EndFunc #CS SpriteTableMode syntax : SpriteTableMode($S_Alias, MODE) Note : $S_Alias = user defined string of the sprite created by function Sprite() Mode = 0 / 1 0 = Loops a table 1 = Loop off #CE Func SpriteTableMode($S_Alias, $S_Mode) DllCall($S_DLL, "long", "SpriteTableMode", "long", $S_Alias, "long", $S_Mode) EndFunc Maybe someone has a use for it Great work jpam! Link to comment Share on other sites More sharing options...
cheatera Posted July 1, 2007 Share Posted July 1, 2007 @jpam i just want to say again how GOOD is this work ... so here is the problem: i need to know everytime when the mouse is over any sprite so i used MouseOverSprite(), but it keeps telling me errors i looked at prospeed.au3 and i saw that the $S_Alias needs to be splited, with "-", but in the $S_Alias there just isnt any "dashes", sooo .... idk what to do. any opinions? expandcollapse popup#include <GUIConstants.au3> #include <Prospeed.au3> Opt("MouseCoordMode",0) $GUI = GUICreate("Pro - x = ",400,400,-1,-1) ; start $POSX = 0 $POSY = 0 $g = 0 Dim $Bee3[80] $SprOfX = 0 $SprOfY = 0 $SpWid = 24 $SpHgt = 18 $SpFrms = 4 $SpStFrm = 1 $SpFrmSpd = 6 $SpPosX = -30 $Sprite2 = @scriptdir & "\Sprites.gif" $SprSpdX = 3 $SprSpdY = 4 ; end $contextmenu = GUICtrlCreateContextMenu() $addline = GUICtrlCreateMenuitem("Add new bee", $contextmenu) GUISetState() $Sprite1 = @scriptdir & "\Sprites.gif" $back = BackgroundScroll(@scriptdir & "\satellite-image-of-netherlands.jpg", 0, 0, 60, 0) $width = GetBmpWidth($back) $Height = GetBmpHeight($back) $sp = sprite($Sprite1, 0, 0, 24, 18, 1, 1, 6, -50, 150) While 1 $msg = GUIGetMsg() $pos = MouseGetPos() GetBackgroundInfos() $title = WinGetTitle("Pro - ", "") WinSetTitle($title, "", "Pro - " & $pos[0] & " " & $pos[1]) $mouse = MouseButton() If $msg = $GUI_EVENT_CLOSE then Exit EndIf If $msg = $addline then $g = $g + 1 ;MsgBox(0, "", "bee!") $Bee3[$g] = sprite($Sprite2,$pos[0], $pos[1], $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $pos[0] + 50, $pos[1] + 50) SetSpriteSpeed($Bee3[$g], $SprSpdX, $SprSpdY) SetmovingRectangle($Bee3[$g], $pos[0], $pos[1], $pos[0], $pos[1]) SetSpriteAnimMove($Bee3, 0, 0, 0) EndIf For $i = 1 to $g $check = MouseOverSprite($Bee3[$g]) if $check <> 0 then Msgbox(0, "", "mouse is over bee " & $i) Endif next If $pos[0] >= 350 Then Select Case $pos[0] >= 400 Scroll_Stop() Case $Offset_X < $width-400 Scroll_Left(4) Case $Offset_X >= $width-400 Scroll_Stop() EndSelect EndIf If $pos[0] <= 50 Then Select Case $pos[0] <= 0 Scroll_Stop() Case $Offset_X > 0 Scroll_Right(-4) Case $Offset_X <= 0 Scroll_Stop() EndSelect EndIf If $pos[1] >= 350 Then Select Case $pos[1] >= 416 Scroll_Stop() Case $Offset_Y < $Height-400 Scroll_down(4) case $Offset_Y >= $Height-400 Scroll_Stop() EndSelect EndIf If $pos[1] <= 50 Then Select Case $pos[1] <= 0 Scroll_Stop() Case $Offset_Y > 0 Scroll_up(-4) case $Offset_Y <= 0 Scroll_Stop() EndSelect EndIf If $pos[0] < 350 And $pos[0] > 50 Then If $pos[1] < 350 And $pos[1] > 50 Then Scroll_Stop() EndIf EndIf Sleep(5) WEnd Func _exit() Exit EndFunc Is There A Life BEFORE Death?im stupidSaved warn logs: cheateraSmOke_N Note Added 17 January 2009 - 02:54 PM Added to warn level Posting a way to hack the registry and force sending someones desktop via TCP. Jos Note Added 25 November 2008 - 02:52 PM Added to warn level for being an impolite rookie.once a year i go bad ... what will happen in 2010??[u]Its GOOD to be BAD ... (Warlock's Succubus - World of Warcraft)[/u] Link to comment Share on other sites More sharing options...
jpam Posted July 1, 2007 Author Share Posted July 1, 2007 (edited) @ cheatera in this scroll demo i use a empty sprite ! if you want a visible sprite in your example change this line 29 $Sprite = @scriptdir & "\Sprites.gif" add this line after line 29 $Sprite1 = loadsprite($Sprite) make sure the background pic is in your scriptdir @ StNick Thanks for finishing "move sprite with table" function i'll will add it to the next update Kind Regards jpam Edited July 1, 2007 by jpam Link to comment Share on other sites More sharing options...
cheatera Posted July 3, 2007 Share Posted July 3, 2007 @jpam: thx for the fast answer my inet conection is not so good so i enter here not so often... nvm so i dont use $Sprite1 = @scriptdir & "\Sprites.gif" i just started to work on that script with the backgrouns scroll and didnt delete the other source... what i mean is that when i click on "add bee" on the menu it must put one bee at $pos[0] and $pos[1]. the var $bee is "dimed" so the user can add not more than 80 (81 with 0) bees. in the main loop as u see there is check for $i = 1 to $g (number of bees been added) and checks id $bee[$g] is under the mouse For $i = 1 to $g $check = MouseOverSprite($Bee3[$g]) if $check <> 0 then Msgbox(0, "", "mouse is over bee " & $i) Endif next so what i mean that $g gets $g+1 everytime user clicks "add bee" and it checks every sec., is any bee (presented with $g) under mouse pos, but everytime i mouseover one sprite it tells me error. atm im not on my own pc but next time i'll send u pic of the error. again: BEAUTIFUL UDF and DLL!!!!! VEEEEEERY nice WORK )) ps: hope to understand what is my problem and solve it Is There A Life BEFORE Death?im stupidSaved warn logs: cheateraSmOke_N Note Added 17 January 2009 - 02:54 PM Added to warn level Posting a way to hack the registry and force sending someones desktop via TCP. Jos Note Added 25 November 2008 - 02:52 PM Added to warn level for being an impolite rookie.once a year i go bad ... what will happen in 2010??[u]Its GOOD to be BAD ... (Warlock's Succubus - World of Warcraft)[/u] Link to comment Share on other sites More sharing options...
DW1 Posted July 6, 2007 Share Posted July 6, 2007 so who will convert the first NES rom to an autoit ProSpeed games???? Will it be you??? I hope so LOL AutoIt3 Online Help Link to comment Share on other sites More sharing options...
McGod Posted July 15, 2007 Share Posted July 15, 2007 How do you create your sprite images? [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
_Kurt Posted September 2, 2007 Share Posted September 2, 2007 (edited) Hello jpam,I've tried different variations of stuff, but I can't seem to get an image appear on the sprite, I always get a black box. The sprite is placed & sized correctly, however the picture does not seem to display.. What's wrong?Background(@scriptdir & "\backround.bmp", 1, 0, 497, 430) $Sprite1 = @ScriptDir & "\F1Note.bmp" $SprOfX = 0 $SprOfY = 0 $SpWid = 90 $SpHgt = 60 $SpFrms = 4 $SpStFrm = 10 $SpFrmSpd = 1 $SpPosX = 50 $Sprite1 = loadsprite($Sprite1) $Sprite = sprite($Sprite,$SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX,40) $SprSpdX = 0 $SprSpdY = 1 SetSpriteSpeed($Sprite, $SprSpdX, $SprSpdY) moveSprite($Sprite, 50, 509)Thanks,KurtEDIT: Also, is there a way to retrieve the sprite coordinates? - Found it.. GetSpriteInfos Edited September 2, 2007 by _Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
jpam Posted September 3, 2007 Author Share Posted September 3, 2007 mybe when you change; $Sprite1 = @ScriptDir & "\F1Note.bmp" $Sprite1 = loadsprite($Sprite1) $Sprite = sprite($Sprite,$SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX,40) to; $Spr1 = @ScriptDir & "\F1Note.bmp" $Sprite1 = loadsprite($Spr1) $Sprite = sprite($Sprite1,$SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX,40) Link to comment Share on other sites More sharing options...
_Kurt Posted September 3, 2007 Share Posted September 3, 2007 That doesn't seem to be working either Thanks for the effort though. I don't know why it isn't displaying.. #include <Prospeed.au3> GUICreate("test", 500, 500) GUISetState() Background(@scriptdir & "\backround.bmp", 1, 0, 497, 430) $Spr1 = @ScriptDir & "\F1Note.bmp" $SprOfX = 0 $SprOfY = 0 $SpWid = 90 $SpHgt = 60 $SpFrms = 4 $SpStFrm = 10 $SpFrmSpd = 1 $SpPosX = 50 $Sprite1 = loadsprite($Spr1) $Sprite = sprite($Sprite1,$SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX,40) $SprSpdX = 0 $SprSpdY = 5 While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit WEnd This isn't working for some reason.. Prospeed.dll & prospeed.au3 are in my @scriptdir. I also tried having another prospeed.au3 in my Include folder. Ooh, and also, even in your Beees.au3 example, I'm not getting the displayed picture (the bees aren't displaying).. I will add 2 attachments for the 2 picture files of the example script above. Thanks, Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
jpam Posted September 3, 2007 Author Share Posted September 3, 2007 (edited) #include <Prospeed.au3> GUICreate("test", 500, 500) GUISetState() Background(@scriptdir & "\backround.bmp", 1, 0, 497, 430) $Spr1 = @ScriptDir & "\F1Note.bmp" $Sprite1 = loadsprite($Spr1) ;$sprite = Sprite($Sprite1, $S_offsetX, $S_offsetY, WIDTH, HEIGHT, FRAMES, START_FRAME, FRAME_SPEED, posX, posY) $sprite = sprite($Sprite1, 0, 0, 94, 95, 1, 1, 0, 40, 40) While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit WEnd Edited September 3, 2007 by jpam Link to comment Share on other sites More sharing options...
_Kurt Posted September 4, 2007 Share Posted September 4, 2007 Thanks alot. stupid me... Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Erik Ruud Posted September 25, 2007 Share Posted September 25, 2007 JPam, I haven't been on the forum for a long time. I just finished looking at the prospeed demos and they are fantastic. The Psa.dll demo is very close to some of what i want to do. Is the source code available? Is there a seperate UDF? Thanks, Erik Link to comment Share on other sites More sharing options...
AlmarM Posted September 25, 2007 Share Posted September 25, 2007 (edited) im getting: Fatal Error AVector []: Out of Bounds.What sould I do ?? I realy want to see what it is Edited September 25, 2007 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Dellairion Posted November 4, 2007 Share Posted November 4, 2007 (edited) It seems that the transparent background of an gif image isnt working? ( LoadImage() ) Lol now i'm using sprites and now there is too much transparent? everthing that should be white or black is transparent also... Edited November 4, 2007 by Dellairion Hot Key ControllerPinball Trainer? Link to comment Share on other sites More sharing options...
jpam Posted November 4, 2007 Author Share Posted November 4, 2007 (edited) @Dellairion please post example code with the gif image so i can look @ it @AlmarM Fatal Error AVector []: Out of Bounds. means: prospeed.dll is not in the scriptdir Edited November 4, 2007 by jpam Link to comment Share on other sites More sharing options...
Dellairion Posted November 9, 2007 Share Posted November 9, 2007 I don't know anymore what i did but it seems to be solved now Thnx anyway. This is what i was trying (something like Habbo): Testgame.rar You should try it out (movement with arrowkeys). The only thing you can do is walk around (yes i know it's boring ^^) but it's a start . Dellairion Hot Key ControllerPinball Trainer? Link to comment Share on other sites More sharing options...
Dellairion Posted November 10, 2007 Share Posted November 10, 2007 (edited) Some more questions where i couldn't find answers for... How can i resize a sprite without manually editing the size of the image itself? (It's to resize the character in the thing i'm trying to create.) And how can i add something like a tekst message on a sprite? (I'm trying to create something like a textballoon above the characters head.) Thnx, Dellairion Edited November 10, 2007 by Dellairion Hot Key ControllerPinball Trainer? Link to comment Share on other sites More sharing options...
peter123 Posted November 11, 2007 Share Posted November 11, 2007 Can I maybe have the resource of the Demo? And that Text code that script is pretty cool But I can't find version 3.2.1.0.1 or something else.. where can I download it? have anybody a site for me? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now