Posted: Sun Sep 21, 2025 6:53 am Post subject: moAllowManualCollapseAndExpand is not working
Clicking on top level table activates/deactivates children as expected but children can still be manually toggled. I would expect moAllowManualCollapseAndExpand="0" is for prohibiting manual expansion.
I would like to move some core codes into separate tables and those would be dependencies of other tables so I want to prohibit deactivating and hence destroying them manually.
Bonus question. Can I include/import lua script in <AssemblerScript>
What is the recommended way of organizing code in case there are feature, utility, core codes? _________________
moAllowManualCollapseAndExpand allows you to manually collapse / expand child memory records with the left / right arrow keys respectively. It has nothing to do with how AA scripts are activated.
It's disabled (0) by default. Enabling it on the memory records `B` and `C` wouldn't do anything since they don't have any children.
Most people have the group configs "Hide children when deactivated" and maybe "Deactivating this entry deactivates its children" set on a parent memory record and call that good enough. If a user changes group configs and starts screwing with stuff, it's their fault if they mess it up.
`globalalloc` can help with storing addresses since that'll never be deallocated if the parent script is disabled without disabling children.
attikaintheworld wrote:
Can I include/import lua script in <AssemblerScript>
Use a {$lua} block like you already are. CE uses a single Lua state everywhere unless explicitly stated otherwise, so globals defined in the main Lua script are accessible everywhere. Remember to execute the main script.
attikaintheworld wrote:
What is the recommended way of organizing code in case there are feature, utility, core codes?
Depends on what you mean by "feature, utility, core codes."
Most people use parent AA scripts w/ hidden-when-deactivated children if you need an address copied from some other injection point.
Call Lua functions defined in the main Lua script for more general purposes. There are also indirect methods: e.g. registerAutoAssemblerCommand, but {$lua} blocks are usually easier.
Edit: you're missing `if syntaxcheck then return end` at the top of each {$lua} block _________________
I don't know where I'm going, but I'll figure it out when I get there.
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