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 


How would i make a script to freeze mobs/ai

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
niko1519
How do I cheat?
Reputation: 0

Joined: 23 Jun 2011
Posts: 7

PostPosted: Mon Apr 21, 2014 4:37 am    Post subject: How would i make a script to freeze mobs/ai Reply with quote

hi ive been playing stalker call of pripyat lately and have been using a mod called misery 2.0 and ive found alot of peoples scripts either dont work or cause alot of glitches so ive decided on making my own but i wanted to implement a feature in which the ai would freeze in place and do nothing. I would also like to be able to switch it on and off on command. But i have absolutley no clue on where to begin anyone have any clue. im betting that it would be pretty simial for most fps games.
Back to top
View user's profile Send private message Send e-mail
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Apr 21, 2014 10:23 am    Post subject: Reply with quote

Depends on the game. Having enemies literally freeze and do nothing may be harder than just freezing their position (i.e. still able to move legs/arms and function, but unable to move from their position). Typically, for position freeze, I look for an instruction that handles all movement/coordinates. If you want an actual freeze, a similar approach may work, but I find that searching for actual speed works best for this.

For coordinates:
Search for player coordinates, once found, look at instructions that access the address(es). Use an instruction that accesses all coordinate addresses (may need to filter out hero coordinates). Nop'ing the instruction should be sufficient, if not, try a different instruction that accesses all coordinate addresses.

For speed:
It depends. Sometimes, this value can be located in the same structure as the coordinates structure (typically a float value, but not always). It can take time to locate this address and finding it is hit or miss. You can also look at the code near the coordinates address, since the game has to know how much force to use for gravity, and how quickly each character object must move etc. If you find this value, you can try setting it to 0 or something close to that. Typically, when I write an actual freeze cheat, I like to add a conditional parameter that ties to health, so that when the enemies are supposed to die, they don't just stand there, frozen, but instead, fall to the ground (or whatever) and actually carry out the death sequence. If you do not do this, you may be left with a bunch of frozen bodies that never disappear etc.

Alternatively, you can use a combination of scripts to achieve what you want. For example, you can write a script that will lock enemy position, and, one that will prohibit the enemy from attacking/firing etc. Just find the instruction that handles that function and NOP for the enemy...easy.
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 Lua Scripting 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