Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --
- -- The parent MR has desc as "[some test with out '['']' ]=>"
- -- then its children MR with same type may have some
- -- Checkbox effect
- -- updated from original: https://forum.cheatengine.org/viewtopic.php?t=587056
- --
- -- save script to autorun directory
- --
- local function MRCheckBoxEffect(mr,newstate)
- if not newstate then return end -- ignore deactivating
- local parent = mr.Parent
- local header = parent and parent.Description:match'^(%[[^%[%]]-%]=>)'
- if not parent or not header then return end
- -- ^ no effect if no parent or its desc not start with [...]=>
- for i=1,parent.Count do
- local sibling = parent[i-1]
- if sibling~=mr and mr.Type==sibling.Type and sibling.Active then
- --^ deactivate same type mr except the activating mr
- sibling.Active=false
- end
- end
- parent.Description = header .. mr.Description
- end
- onMemRecPreExecute = MRCheckBoxEffect
- -- there is only one definition for onMemRecPreExecute
- -- should test if onMemRecPreExecute already defined, and handle properly
Add Comment
Please, Sign In to add comment