 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Wed Jul 07, 2021 6:41 am Post subject: Noclip problem |
|
|
Here's my noclip code
| Code: | function noclipMode(bool)
if bool == 1 then
writeFloat(GameSpeed,0.01);
nm = createTimer(nil);
nm.Interval = 10;
nm.Enabled = true;
nm.OnTimer = function()
if isKeyPressed(98) then
setZPos(5,0,1);
end
if isKeyPressed(104) then
setZPos(5,1,0)
end
if CurrRotate < 0 then
if isKeyPressed(100) then
setYPos(5,0,1);
end
end
if CurrRotate > 0 then
if isKeyPressed(100) then
setXPos(5,1,0);
end
end
if CurrRotate < 0 then
if isKeyPressed(102) then
setXPos(5,0,1)
end
end
if CurrRotate > 0 then
if isKeyPressed(102) then
setYPos(5,1,0)
end
end
if CurrRotate < 0 then
if isKeyPressed(38) then
setYPos(5,1,0);
end
end
if CurrRotate > 0 then
if isKeyPressed(38) then
setXPos(5,0,1);
end
end
if CurrRotate < 0 then
if isKeyPressed(40) then
setXPos(5,1,0)
end
end
if CurrRotate > 0 then
if isKeyPressed(40) then
setYPos(5,0,1)
end
end
if isKeyPressed(37) then
writeFloat(player.TargetRotate,TargetRotate - 0.1);
writeFloat(player.CurrRotate,CurrRotate - 0.1);
end
if isKeyPressed(39) then
writeFloat(player.TargetRotate,TargetRotate + 0.1);
writeFloat(player.CurrRotate,CurrRotate + 0.1);
end
end
end
if bool == 0 then
nm.destroy()
writeFloat(GameSpeed,1);
end
end
|
But i have problem
Noclip is just broken when im trying to fly forward or backward player just moving in random direction
Same as with numpad 4 and 6
But with 4 and 6 sometimes player fly accurately
2 and 8 setting the Z pos(In game z pos is height,this is not broken)
|
|
| Back to top |
|
 |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Sat Jul 10, 2021 3:01 am Post subject: |
|
|
| Help someone?
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4707
|
Posted: Sat Jul 10, 2021 3:28 pm Post subject: |
|
|
You aren't indenting your code properly (annoying to me) and you don't show the definition of set[XYZ]pos anywhere.
If I had to guess, you aren't accounting for the direction the player is facing when increasing/decreasing the position. You need to know basic trigonometry to do that correctly.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Sun Jul 11, 2021 12:45 am Post subject: |
|
|
| You need piece of code that setting a pos?
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4707
|
Posted: Sun Jul 11, 2021 2:04 am Post subject: |
|
|
Maybe parameters to set[XYZ]pos are independent of the player's rotation, and the function transforms those coordinates to the game's coordinate space. I don't think that's happening though.
If the set[XYZ]pos functions simply write a value into memory and don't do any math, then I refer to my guess in my previous post. (I'm not going to teach you trigonometry, and I'm not going to write the code for you either)
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Sun Jul 11, 2021 2:25 am Post subject: |
|
|
It's fine, just in game player rotation is '1 radian = 57.295779513 degrees'
I already maked some fixes
|
|
| Back to top |
|
 |
|
|
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
|
|