Lakes Posted January 10, 2007 Share Posted January 10, 2007 Working!! Great and Speedy work Mr Jpam!! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
jpam Posted January 10, 2007 Author Share Posted January 10, 2007 Thanks Zedna where trying to do our best to make this a great addon for autoit tip; try to make text sprites ,you get funny results Link to comment Share on other sites More sharing options...
Lakes Posted January 10, 2007 Share Posted January 10, 2007 (edited) Its a Swarm!! Don`t get stung! CODE#include <GUIConstants.au3> #include <Prospeed.au3> Opt("MouseCoordMode",0) Opt("GUIOnEventMode", 1) HotKeySet("{Esc}","_exit") $gui = GUICreate("Prospeed",800, 400, -1, -1,$WS_POPUP) GUISetState() ;Background(FILE, POSX, POSY) ;loads Background Background(@scriptdir & "\Hintergrund.jpg", 0, 0) $POSX = 0 $POSY = 0 $SprOfX = 0 $SprOfY = 0 $SpWid = 24 $SpHgt = 18 $SpFrms = 4 $SpStFrm = 1 $SpFrmSpd = 6 $SpPosX = -30 $Sprite1 = @scriptdir & "\Sprites.gif" $Sprite2 = @scriptdir & "\Sprites2.gif" ;Sprite("Sprite picture", offsetX, offsetY, WIDTH, HEIGHT, FRAMES, START_FRAME, FRAME_SPEED, posX, posY) ;loads sprites sprite($Sprite1,$SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX,40) sprite($Sprite2,$SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX,60) #CS CopySprite syntax : CopySprite(nr) Note ; copies a sprite with indentical parameters If you want to make a lot of incentical sprites you better use CopieSprite Create first sprite with Sprite func and then copie that sprite multiple times #CE $NumOfSpr = 80 For $i = 1 to $NumOfSpr CopySprite(1) CopySprite(2) next $SprSpdX = 3 $SprSpdY = 4 For $i = 1 to $NumOfSpr SetSpriteSpeed($i, $SprSpdX, $SprSpdY) next #CS SetSpriteAnimMove syntax : SetSpriteAnimMove(Spritename, Sprite nr, Direction, offsetX, offsetY) Note ; Spritename = name created with func Sprite() Sprite nr = number of the sprite created by function Sprite() Direction = The direction to face the sprite to For every direction the sprite moves you can change the animation sequence 0 = Standing still 1 = right up 2 = right 3 = right down 4 = down 5 = left down 6 = left 7 = left up 8 = up offsetX = Where to find the sprite in the bitmap on x position ;Mostly starts with zero offsetY = Where to find the sprite in the bitmap on y position #ce SetSpriteAnimMove($Sprite1, $NumOfSpr, 1, 0, 0) SetSpriteAnimMove($Sprite1, $NumOfSpr, 2, 0, 0) SetSpriteAnimMove($Sprite1, $NumOfSpr, 3, 0, 0) SetSpriteAnimMove($Sprite1, $NumOfSpr, 5, 0, 32) SetSpriteAnimMove($Sprite1, $NumOfSpr, 6, 0, 32) SetSpriteAnimMove($Sprite1, $NumOfSpr, 7, 0, 32) For $i = 1 to $NumOfSpr/2 SetSpriteAnimMove($Sprite1, $i, 1, 0, 0) SetSpriteAnimMove($Sprite1, $i, 2, 0, 0) SetSpriteAnimMove($Sprite1, $i, 3, 0, 0) SetSpriteAnimMove($Sprite1, $i, 5, 0, 32) SetSpriteAnimMove($Sprite1, $i, 6, 0, 32) SetSpriteAnimMove($Sprite1, $i, 7, 0, 32) Next For $i = $NumOfSpr/2 to $NumOfSpr SetSpriteAnimMove($Sprite2, $i, 1, 0, 0) SetSpriteAnimMove($Sprite2, $i, 2, 0, 0) SetSpriteAnimMove($Sprite2, $i, 3, 0, 0) SetSpriteAnimMove($Sprite2, $i, 5, 0, 32) SetSpriteAnimMove($Sprite2, $i, 6, 0, 32) SetSpriteAnimMove($Sprite2, $i, 7, 0, 32) Next ;SetmovingRectangle(Sprite nr, LEFT, TOP, RIGHT, BOTTOM) sets cage for sprite For $i = 1 to $NumOfSpr SetmovingRectangle($i, 0, 0, 790, 390) next For $n = 1 to 19 For $i = 1 to $NumOfSpr - 1 Movesprite($i,Random(5,800, 1),Random(5,410, 1), 4, 1) sleep(10) Next next While 1 For $i = 1 to $NumOfSpr - 1 $pos = MouseGetPos() Movesprite($NumOfSpr,$pos[0],$pos[1], 1, 1) Movesprite($i,800 ,400, 2, 1) sleep(150) Next WEnd Func _exit() Exit EndFunc EDIT: has correct sprite Anim now. Edited January 10, 2007 by Lakes 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
CoderDunn Posted January 10, 2007 Share Posted January 10, 2007 (edited) @Hallman func "LoadImage"does what you want now, but not for all effectsyou can first load a image put it on screen or hold it in memory swich = 0/1then put 1 or more effects on ithope that helps youThanks jpam. Works like a charm for what I want. This project is moving quite fast. Before to long you will have all prospeed functions as UDF's. The joystick stuff might prove usefull. Thanks for this great addition to AutoIt. Edited January 10, 2007 by Hallman Link to comment Share on other sites More sharing options...
jaenster Posted January 11, 2007 Share Posted January 11, 2007 Excellent!!!The same i would say.. Dude are you sure this is autoit Woot -jaenster Link to comment Share on other sites More sharing options...
GtaSpider Posted January 11, 2007 Share Posted January 11, 2007 Hello! It doesnt work by me. ive testet you sprite example but he crash ever with the Subscript crash D:\skripts\Autoit\wg01.au3 (512) : ==> Subscript used with non-Array variable.: DllCall($S_DLL,"long","CopyExtBmp","long",$S_fensterkopie1[0],"long",0,"long",0,"long",$S_WINSIZE[0],"long",$S_WINSIZE[1],"long",$hDC,"long",0,"long",0,"long",0) DllCall($S_DLL,"long","CopyExtBmp","long",$S_fensterkopie1^ ERROR Btw: Why open you every funktion the Dll prospeed and close it then in the funct? Why not on Start of the UDF (e.g. Line 32: Dim $S_DLL = DllOpen("ProSpeed.dll") ) and then with OnAutoItExit() ( DllClose($S_DLL)) I think so its just a little bit faster... But what ive seen so far from your udf is very very great! Thanks to you jpam and Frank! Mfg/best regards Spider www.AutoIt.de - Moderator of the German AutoIt Forum Link to comment Share on other sites More sharing options...
jpam Posted January 11, 2007 Author Share Posted January 11, 2007 make sure you put the Prospeed.dll in windows/system32 or in the scriptdir and download the lasted prospeed.dll from franks webpage jpam Link to comment Share on other sites More sharing options...
jpam Posted January 11, 2007 Author Share Posted January 11, 2007 Sprite limit of 10 bug removed ! Joystick Functions allmost done DirectXsound Allmost done That's it for today guys jpam Link to comment Share on other sites More sharing options...
NELyon Posted January 11, 2007 Share Posted January 11, 2007 I'm liking the rapid ( Emphasize RAPID) development on this library. All i can say is GOOD JOB. Link to comment Share on other sites More sharing options...
Lakes Posted January 12, 2007 Share Posted January 12, 2007 Rapid? More like WARP speed!! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
CoderDunn Posted January 12, 2007 Share Posted January 12, 2007 Rapid? More like WARP speed!! I second that. Just think of the kind of things we can make when this is done .... Link to comment Share on other sites More sharing options...
jpam Posted January 12, 2007 Author Share Posted January 12, 2007 There's a new updated for you guys added GetSpriteMoveX added GetSpriteMoveY added InitPixelEffects added SetPixelEffect added DeInitPixelEffects Have fun For Joystick functions there's comming a new special prospeed.dll version frank change some things in the dll to work with Joysticks and AutoIt Link to comment Share on other sites More sharing options...
Lakes Posted January 12, 2007 Share Posted January 12, 2007 Current UDF has a few bugs, sprites no longer work, I`m using an old version of the UDF for now... Anyone have the version before this one? Thanks! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
jpam Posted January 12, 2007 Author Share Posted January 12, 2007 sorry updated a faulty expirimental version new working version online now, redownload please ! Link to comment Share on other sites More sharing options...
Lakes Posted January 12, 2007 Share Posted January 12, 2007 Yep, all good, thanks again! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Lakes Posted January 12, 2007 Share Posted January 12, 2007 Corrected missing $S_StartPixel var in Func SetPixelEffect($S_offsetX, $S_offsetY, $S_Color, $S_StartPixel, $S_Disperse, $S_PixelStrenght, $S_Pixeldirection, $S_PixelAmount, $S_Colormode, $S_LifeTime) DllCall($S_DLL,"long","SetPixelEffect","long",$hDC,"long",$S_fensterkopie1[0],"long",$S_offsetX,"long",$S_offsetY,"long",$S_Color,"long",$S_StartPixel,"long",$S_PixelStrenght,"long",$S_Pixeldirection,"long",$S_Pixelamount,"long",$S_Colormode,"long",$S_LifeTime) EndFunc 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
jpam Posted January 13, 2007 Author Share Posted January 13, 2007 Corrected it New update Link to comment Share on other sites More sharing options...
jpam Posted January 13, 2007 Author Share Posted January 13, 2007 (edited) New Update Added BackgroundScroll Added Scroll_Left() Added Scroll_Right() Added Scroll_Up() Added Scroll_Down() Added Scroll_Stop() Download Example code + pictures from first page All Collision functions working properly now Movesprite function changed to "Movesprite(Sprite number, posX, posY)" Speed settings are set with function "SetSpriteSpeed(Sprite number, SpeedX, SpeedY)" Don't forget to update your "Prospeed.au3" from first page Have fun jpam Edited January 13, 2007 by jpam Link to comment Share on other sites More sharing options...
GtaSpider Posted January 13, 2007 Share Posted January 13, 2007 Hi! thanks for your help, ive iv downloaded the newest prospeed.dll but now he gives me another error: -1073741819 (autoit.exe exit code..) Am I incorect? I think that Frank has Fixed the "bug"?!? Mfg / Best regards Spider www.AutoIt.de - Moderator of the German AutoIt Forum Link to comment Share on other sites More sharing options...
Lakes Posted January 13, 2007 Share Posted January 13, 2007 (edited) Working Ok here, but I have the original Dll here... I mean the one after the original version where the autoit bug was fixed, I think Frank may have changed the Dll to work for Autoit Joystick functions? Edited January 13, 2007 by Lakes 2015 - Still no flying cars, instead blankets with sleeves. 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