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 


Regeneration logic

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Frouk
Grandmaster Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 510

PostPosted: Fri Jan 28, 2022 7:00 am    Post subject: Regeneration logic Reply with quote

Let's say, you have game where shield and health is exist,but when you made regeneration code(for health and for shield),losing health and shield,there's no regeneration sort(first to regenerate health,then shield,but it won't at all),so here's solution(insert this code into your shield regeneration code):
Code:
local health = readFloat("healthAddress") --replace address
local maxHealth = readFloat("maxHealthAddress") --replace address
local canRegenerate
if health => maxHealth then
canRegenerate = true
else
canRegenerate = false
end
if not canRegenerate then return end
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