-
Notifications
You must be signed in to change notification settings - Fork 7
Is the player dead? #27
-
Hey, using your api, how can I make sure whether the player has died during the session?
Beta Was this translation helpful? Give feedback.
All reactions
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
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}");...
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
As an idea. You could look at the position, if it resets to zero at the moment - it means death
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.
All reactions
-
I've used a cheat engine for finding an sequence of offsets 0x003222D0, 0x164, 0x224, 0x4E8, 0xB4, 0x67C
There is a problem when game will be updated: the offsets may not be relevant, which is why they will have to be found again.
I couldn't find a more simple way to keep the offsets up to date, so this direction of the library has become a non-priority
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you for responding!
Beta Was this translation helpful? Give feedback.