Sign in to follow this  
Followers 0
hixxa321

Help in making game

2 posts in this topic

#1 ·  Posted

Hello, I have two questions.
1. Is it possible to make variable get every second + 1 to it's value without pausing While... WEnd loop? in GUI? (It's needed for a game that i wanna make with AutoIt :D)
2. Is it possible to do something like: 
 

Local $rr = 3000
Do
GUICtrlSetData($Score, GUICtrlRead($Score) + 1)
Until GUICtrlRead($Score) = $rr

without pausing While... WEnd loop in GUI?   (Used to make score not just jump from 0 to 3000 but do nice effect :D)


Entire code looks like that:  (this don't do too much, those are just first things)
 

#include <GUIConstantsEx.au3>

Global $Gra2 = 9999
Local $num = 0
Local $rr = 2000000
Local $Gra = GUICreate("", 300, 200)
Local $Z = GUICtrlCreateButton("Zaczynamy", 10, 140, 280, 50)
Local $Score = GUICtrlCreateLabel("0", 10, 10, 250, 20)
GUISetState(@SW_SHOW, $Gra)
While 1
   $aMsg = GUIGetMsg(1)
   Sleep (1000)
   $num += 1
   Switch $aMsg[1]
      Case $Gra
         Switch $aMsg[0]
         Case $GUI_EVENT_CLOSE
            Exit
         Case $Z
            EndSwitch
      Case $Gra2
          Switch $aMsg[0]
          EndSwitch
   EndSwitch
WEnd

Func Start()
   ;GUICtrlCreateAvi(
EndFunc

I would appreciate any help :)

Share this post


Link to post
Share on other sites



#2 ·  Posted

Thanks to this lovely guy that created this: 

I can do those two things that I were asking! Yaaay! :D:D:D

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