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 


Code to freeze record value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Sun Nov 05, 2017 9:32 am    Post subject: Code to freeze record value Reply with quote

Code:

function ConstLight(sender)
   AL = getAddressList()
   ???
end
   trainer.t = createTimer(nil, false)
   trainer.t.onTimer = ConstLight
   trainer.t.Interval = 1000;
--
   trainer.l_cb = createCheckBox(trainer.form);
   trainer.l_cb.Caption = 'Light';
   trainer.l_cb.Height = 20;
   trainer.l_cb.Left = 260;
   trainer.l_cb.Width = 75;
   trainer.l_cb.Top = 97;
   trainer.l_cb.onClick =   function (sender)
                           if sender.Checked then
                              trainer.t.Enabled = true;
                           else
                              trainer.t.Enabled = false;
                           end
                        end

I have a record that has a value of "Light" and I would like to be able to code freezing its value. I know one can check the record to freeze it but I would like to do the freezing with a check box and code.
Back to top
View user's profile Send private message Yahoo Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Nov 05, 2017 12:57 pm    Post subject: Reply with quote

Code:
AL.getMemoryRecordByDescription("Light").Active = true
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Mon Nov 06, 2017 9:52 pm    Post subject: Reply with quote

Thanks, works like a charm, but I sure don't understand the syntax.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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