Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Visual Basic Comand List???

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Spider_Games
Advanced Cheater
Reputation: 0

Joined: 28 May 2008
Posts: 79

PostPosted: Sat Aug 02, 2008 5:01 pm    Post subject: Visual Basic Comand List??? Reply with quote

Hey I use visual basics for trainers. Im working on another one and I have a gero grav comand
"
Private Sub Command4_Click()
Call ShockwaveFlash1.SetVariable("_root.GRAVITY", 0)
End Sub
"

is there a way to have a button or checkbox to toogle between 1 and 0?

and is there a place where I can see all comands???
THx
Back to top
View user's profile Send private message
Winner-XXL
Cheater
Reputation: 0

Joined: 08 Jul 2008
Posts: 33
Location: Outer Space

PostPosted: Sun Aug 03, 2008 2:48 am    Post subject: Reply with quote

For VB 2008 (Also works in VB6 - with some changes):

---- Tutorial for Chack Box to change Value + Tutorial for Button to change Value between 2 values ----

If you want a CheckBox Togle to the Toolbox and drag the box into your Form.
Now klick at "Items" in the Properties.
Now you can add the Text you want for both Values.
I called them "Gravity=0" and "Gravity=1".
Now klick at the CheckBox and enter

Code:
If CheckBox1.Text = "Gravity=0" Then
   AxShockwaveFlash1.SetVariable("_root.GRAVITY", 0)
End If

If CheckBox1.Text = "Gravity=1" then
   AxShockwaveFlash1.SetVariable("_root.GRAVITY", 1)
End If


Think this Code should work^^.

For VB6:

Klick at List to add the two Values to choose ("Gravity=0" and "Gravity=1") in the Box^^.

Code:
If Combo1.Text = "Gravity=0" Then
   Call ShockwaveFlash1.SetVariable("_root.GRAVITY", 0)
End If

If Combo.Text = "Gravity=1" then
   Call ShockwaveFlash1.SetVariable("_root.GRAVITY", 1)
End If



-------------------------------------------------------------------------------------

If you want to do it with a normal Button then use the following code:
(Code for VB 2008 - I am not sure if it also works for VB6)

Set Button Text to "Value = 1"
It should change to "Value = 0" if you klick it once and Value should be 0
When klicking it again it should change to "Value = 1" and the vlaue is 1 again.

Code:
        If Form1.AxShockwaveFlash1.GetVariable("_root.GRAVITY") = 1 Then
            Form1.AxShockwaveFlash1.SetVariable("_rootGRAVITY", 0)
            Button1.Text = "Value = 0"
        Else
            If Form1.AxShockwaveFlash1.GetVariable("_root.GRAVITY") = 0 Then
                Form1.AxShockwaveFlash1.SetVariable("_GRAVITY", 1)
                Button1.Text = "Value = 1"
            End If
        End If


If the Standart Value of the Gravity is 1 this Code should be OK
If the Standart Value of the Gravity is 0 change all Zeroes in the code to ones and all ones to Zeroes.

Hope i could help you^^. Cool
Like my explanation?? Then rep+ Smile


PS: Admins - Put this into Flash Selection. Think he should get more help there^^.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Aug 03, 2008 3:04 am    Post subject: Reply with quote

Winner-XXL wrote:
SNIP


Why are you checking the checkbox text? Check if it's checked.

Might be smarter to use the indexes of items instead of text.
Back to top
View user's profile Send private message
Winner-XXL
Cheater
Reputation: 0

Joined: 08 Jul 2008
Posts: 33
Location: Outer Space

PostPosted: Sun Aug 03, 2008 3:29 am    Post subject: Reply with quote

oh yeah i understand^^ oops^^
Next time i will use indexes - but i think with text it's easier to understand for noobs^^
Back to top
View user's profile Send private message
Spider_Games
Advanced Cheater
Reputation: 0

Joined: 28 May 2008
Posts: 79

PostPosted: Sun Aug 03, 2008 6:00 am    Post subject: Reply with quote

it is and it worked. Whats an index?
Back to top
View user's profile Send private message
Winner-XXL
Cheater
Reputation: 0

Joined: 08 Jul 2008
Posts: 33
Location: Outer Space

PostPosted: Sun Aug 03, 2008 6:26 am    Post subject: Reply with quote

If you make a commandBox
(you can also call it DropDownBox)
you can write different Values you can choose into the Box.
an Index is a value that accords to what is written in the Box.

The first thing you can choose has the Index of 0
The second thing hast the index of 1
3rd: INdex = 2
.
.
.

Hope you understand it now^^
Back to top
View user's profile Send private message
Spider_Games
Advanced Cheater
Reputation: 0

Joined: 28 May 2008
Posts: 79

PostPosted: Sun Aug 03, 2008 7:04 am    Post subject: Reply with quote

ok thx
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites