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 


HELP CE default trainer Toggle Button

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
guy960915
Expert Cheater
Reputation: 2

Joined: 17 Sep 2007
Posts: 168

PostPosted: Sun Aug 11, 2019 5:40 am    Post subject: HELP CE default trainer Toggle Button Reply with quote

need help ,

i want to make the toggle button (#1) enable a cheat (#2)

what do i write on (#3)


i got these samples, but not what I'm looking for,

getAddressList().getMemoryRecordByDescription('').Active = sender.checked
writeInteger('',) or memoryrecord_freeze( )
[/img]



2019-08-11_190757.png
 Description:
 Filesize:  32.17 KB
 Viewed:  2622 Time(s)

2019-08-11_190757.png


Back to top
View user's profile Send private message
guy960915
Expert Cheater
Reputation: 2

Joined: 17 Sep 2007
Posts: 168

PostPosted: Sat Aug 31, 2019 8:17 am    Post subject: Reply with quote

is this even possible?

already searched, nothing about this.


i just want to add a toggle button to the existing cheat table.
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sat Aug 31, 2019 9:47 am    Post subject: Reply with quote

look what code was generated for that script in the trainer's lua script and either copy or call it.
_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
guy960915
Expert Cheater
Reputation: 2

Joined: 17 Sep 2007
Posts: 168

PostPosted: Sat Aug 31, 2019 9:52 pm    Post subject: Reply with quote

this is part of the generated

Code:

function onPostHotkey0(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=Hotkey.Owner
local isActive=memrec.Active --get the state after the hotkey got triggered
    CETrainer.CHEAT0.setActive(isActive) --gui update, nothing else
    if gPlaySoundOnAction then
      if isActive then
       playSound(gActivateSound)
    else
        playSound(gDeactivateSound)
      end
    end
  end

memrec45_hotkey0.onPostHotkey=onPostHotkey0


how do i call this?
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sun Sep 01, 2019 4:27 pm    Post subject: Reply with quote

onPostHotkey0(memrec45_hotkey0) or memrec45_hotkey0.doHotkey() (should call both OnHotkey and OnPostHotkey, if set)
_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
guy960915
Expert Cheater
Reputation: 2

Joined: 17 Sep 2007
Posts: 168

PostPosted: Tue Sep 03, 2019 12:31 pm    Post subject: Reply with quote

than you,

memrec45_hotkey0.doHotkey()

this worked,
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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