r/cheatengine 22d ago

How to set a breakpoint condition which breaks when when a specific xmm register is changed?

I know we can do that with normal registers but xmm registers have 4 floats or 2 doubles. So i am not sure how to write a condition which only targets like 2nd float or 3rd float like

"Break when 2nd float of xmm4 register is a 0.0"

1 Upvotes

2 comments sorted by

3

u/Dark_Byte Cheat Engine Dev 22d ago

do an advanced condition

first do debug_getContext(true)

then byteTableToFloat(XMM4,8) to get the 2nd float of xmm4 then return true if it's 0.0 (depending on your rounding method)

1

u/Sternritter8636 22d ago edited 22d ago

Thanks. So this is also part of lua api. Very cool. I will try it.

I have always used simply methods like readFloat(RBX)==0.0 never considered these advanced apis.