View previous topic :: View next topic |
Author |
Message |
Profound_Darkness Newbie cheater Reputation: 0
Joined: 21 May 2015 Posts: 23
|
Posted: Fri Jun 12, 2015 7:44 pm Post subject: Does CE have something like this/self for Lua in a script? |
|
|
btw: I'm just learning Lua via Cheat Engine so...
I'm wondering if CE has something like this/self/me in to either get the ID, index, or simply MemoryRecord object of the record where the Lua code is running from.
This is what I'm looking at now:
Code: |
//This entry is called "[Example]"
[ENABLE]
//bla bla, don't care
[DISABLE]
{$lua}
local myself = getAddressList().getMemoryRecordByDescription("[Example]")
--The above line is what I'm looking to replace...
deactivateChildren(myself)
{$asm}
//all the typical disable stuff... Also don't care.
|
I haven't had much luck via Google nor skimming the source (via Google Code).
btw: deactivateChildren is recursive and so far seems to work just fine.
FYI - I want to deactivate ALL children of a script when the top script is deactivated as sub-scripts are reliant on work done by the main script and I want the memory to get freed up, etc. |
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Jun 12, 2015 8:08 pm Post subject: |
|
|
Right-click the parent script, Group config > (De)Activating this entry (de)activates children.
Also, copy (CTRL-C) the script you want and paste it into NotePad.
You can use the <ID>#</ID> to retrieve memory record by ID. |
|
Back to top |
|
|
Profound_Darkness Newbie cheater Reputation: 0
Joined: 21 May 2015 Posts: 23
|
Posted: Fri Jun 12, 2015 8:56 pm Post subject: |
|
|
Thanks much, if the ID is static as in doesn't change regardless of what I do to it (short of deletion), that would do nicely.
As for (De)Activating this entry (de)activates children option, tried it before going the Lua route and it also activates children and I only want to deactivate children. Thanks though. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25289 Location: The netherlands
|
Posted: Sat Jun 13, 2015 1:39 am Post subject: |
|
|
the id is static yes, it won't change regardless of adding/removing entries before it, nor dragging it around to different positions
and next version activating/deactivating will be split up _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 55
Joined: 01 Oct 2008 Posts: 942
|
Posted: Sun Jun 14, 2015 6:44 pm Post subject: |
|
|
Dark Byte wrote: | the id is static yes, it won't change regardless of adding/removing entries before it, nor dragging it around to different positions
and next version activating/deactivating will be split up |
Could the memory record id also send like syntaxcheck a lua 'global'(accessible from lua script inside the mr ) variable during activating/deactivating, and including in registered aa-command/prologue's 3rd parameters ?
Thank you~ |
|
Back to top |
|
|
|