Jump to content

Recommended Posts

Posted

As you all know i am currently making a game :)

But i ran into another problem:

I have a picture on a Gui that moves; and i want to exit the game if you click on the picture.

Is this possible

I tried to search the forum couldn't find anything :)

Please help Me

Thank you!!

code
Posted (edited)

Like this?

$Pic = GUICtrlCreatePic() ; put your pic here...etc

$GUIMsg = GUIGetMsg()

Switch $GUIMsg

Case $Pic

Exit

Endswitch

Just have a case inside your script like so...so if it's clicked, it will exit.

Edited by Swift
Posted

Like this?

$Pic = GUICtrlCreatePic() ; put your pic here...etc

$GUIMsg = GUIGetMsg()

Switch $GUIMsg

Case $Pic

Exit

Endswitch

Just have a case inside your script like so...so if it's clicked, it will exit.

Oh okay.. It works great now. Thank you very much

code

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...