Page 1 of 1

Sniper Elite 4 In-Game Timer

Posted: Mon Jan 25, 2021 10:19 am
by Kr00zE
Hey all, sorry if this isn't in the right place.

This is my first proper go using Cheat Engine, I am trying to extract and show the in-game timer from Sniper Elite 4 which I think I got with a pointer scan. My problem is that I am unsure where to go from here..

I created a form within CE, added a timer on 1 second intervals on a label to show the value "in-game timer" and works, but when I re-created a standalone exe it doesn't. I have tried googled it and I am guessing it's because it reads from getMemoryRecordByDescription. And now I am unsure what to do to get it into its own exe.

The code is

Code: Select all

anything = getAddressList().getMemoryRecordByDescription("In-Game Timer")

function UDF1_CETimer1Timer(sender)
UDF1.CELabel1.Caption = (string.format("%2.1f", anything.value))
end
Thank you

Re: Sniper Elite 4 In-Game Timer

Posted: Sun Feb 14, 2021 7:38 am
by aSwedishMagyar
If you know the pointer you don't have to use the memory record in the table to get the value. Just use getAddressSafe and readFloat: value=readFloat(getAddressSafe('[[[baseAddress]+offset1]+offset2]+finaloffset'))

Here you would make baseAddress the process name (or whatever base you got from the pointer scan) and just go up the list of offsets using the brackets to denote it is the value inside that address you want.