Is the player dead? #27
Answered
by
Folleach
KirillMakarichev
asked this question in
Q&A
-
Hey, using your api, how can I make sure whether the player has died during the session? |
Beta Was this translation helpful? Give feedback.
Answered by
Folleach
Sep 26, 2023
Replies: 2 comments 1 reply
-
Note: work with process memory isn't priority for the library. But! You can still use a small wrapper over the win api GameProcess process = new GameProcess();
process.Initialize(Access.PROCESS_VM_OPERATION | Access.PROCESS_VM_READ | Access.PROCESS_VM_WRITE);
IntPtr Player = process.Read<IntPtr>(process.GetModule("GeometryDash.exe"), new[] { 0x003222D0, 0x164, 0x224, 0x4E8, 0xB4 });
int AddressPositionX = IntPtr.Add(Player, 0x67C).ToInt32();
while (true)
{
float posX = process.Read<float>(AddressPositionX);
// check previous value of posX here
Console.WriteLine($"Position X: {posX}");
Thread.Sleep(16);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Folleach
-
Thank you for responding! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: work with process memory isn't priority for the library.
But! You can still use a small wrapper over the win api
As an idea. You could look at the position, if it resets to zero at the moment - it means death