LimeSeed Posted June 11, 2008 Share Posted June 11, 2008 I am developing slime volleyball on autoit, and then my goal eventually is to embed it on a website using aucgi.exe! Anyways, i have gotten somewhere and developed my little version with one slime, no boundaries (i can easily make the slime boundaries, just too lazy now), but he can move, and jump but really badly. How would i implememnt a ball in the game that realistically bounces against the floor, walls, and most importantly the slime. I have included my code, and my images to use with the code. Thanks! expandcollapse popup#include<guiconstants.au3> #include <Misc.au3> #NoTrayIcon $slimevolleyball = guicreate("Slime Volleyball by 2o2", 745, 345) GUISetBkColor(0x0000FF) $1 = 1 $l = 120 $q = 230 $w = 80 $e = 42.5 $j = 0 $Dll = DllOpen("user32.dll") $slime1 = @scriptDir & "\Slime1.bmp" $floor = @scriptDIr & "\floor.bmp" guisetstate(@SW_SHOW) _slime() _floor() while $1 = 1 $msg = guigetmsg() Select Case ($msg = -3) $1 = 2 EndSelect If _IsPressed("27", $DLL) Then $l = $l + 3 guictrlsetpos($slimeg1, $l, $q, $w, $e) EndIf If _IsPressed("26", $DLL) Then $q = $q - 3 $j = $j + 1 guictrlsetpos($slimeg1, $l, $q, $w, $e) elseif $j > 10 Then $q = 230 guictrlsetpos($slimeg1, $l, $q, $w, $e) EndIf If _IsPressed("25", $DLL) Then $l = $l - 3 guictrlsetpos($slimeg1, $l, $q, $w, $e) EndIf WEnd func _Slime() if fileexists($slime1) Then global $slimeg1 = guictrlcreatepic($slime1, $l, $q, $w, $e) Else msgbox(0, "Slime Volleyball by 2o2", "Error, missing image") $1 = 2 EndIf EndFunc func _floor() if fileexists($floor) Then $floorg = guictrlcreatepic($floor, 0, 272.5, 745, 80) Else msgbox(0, "Slime Volleyball by 2o2", "Error, missing image") $1 = 2 EndIf EndFuncSlime1.bmpfloor.bmp global $warming = true 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