Sign in to follow this  
Followers 0
LimeSeed

Slime Volleyball Help

1 post in this topic

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!

#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
EndFunc

Slime1.bmp

floor.bmp


global $warming = true

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