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 


having a problem with creating a script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
hodayfa000h
Newbie cheater
Reputation: 0

Joined: 26 Dec 2022
Posts: 18

PostPosted: Tue Dec 26, 2023 10:44 am    Post subject: having a problem with creating a script Reply with quote

so whenever I do something and 2 instructions affect it like for example fire damage has a different instruction than enemy damage how do I make a script that simply does that with 1 script that affects both? not to be specific to health but anything really i just make it under the first script and make it activate whenever the actual script activates and same for disabling but that is inconvenient any other way Very Happy ? also i am new so i don't know a lot about stuff as i rarely watch tutorials
if you need more clarification, tell me
and this is really hard to read ngl

_________________
...
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4703

PostPosted: Tue Dec 26, 2023 12:15 pm    Post subject: This post has 1 review(s) Reply with quote

You could drag one script on the other script and use the options in the right click menu to activate / deactivate child memory records when the parent memory record is activated / deactivated.

Or combine the scripts. Search for `site:cheatengine.org combine scripts`

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
hodayfa000h
Newbie cheater
Reputation: 0

Joined: 26 Dec 2022
Posts: 18

PostPosted: Tue Dec 26, 2023 1:09 pm    Post subject: Reply with quote

ParkourPenguin wrote:
You could drag one script on the other script and use the options in the right click menu to activate / deactivate child memory records when the parent memory record is activated / deactivated.

Or combine the scripts. Search for `site:cheatengine.org combine scripts`

i made a script that makes a Thread which calls a Function so in short how will i call the same function twice with different parameters (If that is the correct word)
i couldn't double post so i deleted the old one to post this one

_________________
...
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4703

PostPosted: Tue Dec 26, 2023 1:52 pm    Post subject: Reply with quote

...just combine the scripts? I don't see what the problem is.

Two different `newmem` sections that both call the same function with different arguments. Two different `createthread` calls for each `newmem`.
Code:
alloc(newmem1,2048)
alloc(newmem2,2048)

newmem1:
  ...

newmem2:
  ...

createthread(newmem1)
createthread(newmem2)

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Dec 26, 2023 3:31 pm    Post subject: This post has 1 review(s) Reply with quote

How to easily combine scripts:

Once the first script is created, simply keep the Auto Assemble/script window open (or open it from your table), then just make sure to have the injection point for the next script highlighted inside of Memory Viewer, and select "Template" from the original script window and go through the process as you normally would. CE will compile the script correctly. Just make sure to give it a different name
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