 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
squerol Advanced Cheater
Reputation: 2
Joined: 06 Jul 2015 Posts: 65 Location: Poland
|
Posted: Tue Aug 16, 2016 8:37 am Post subject: What's wrong with this timer script? |
|
|
Hey. I'm working on some stuff (dodge system to Gothic 3 via cheat engine, Autohotkey software is too laggy), and I've created some timer script (to be honest copy-pasted-edited it )
Code: |
function d1(sender)
getAddressList().getMemoryRecordByDescription("back-dash").Value=2500
getAddressList().getMemoryRecordByDescription("side-dash").Value=2500
getAddressList().getMemoryRecordByDescription("forward-dash").Value=2500
end
createHotkey(d1, 16)
function d2(sender)
getAddressList().getMemoryRecordByDescription("back-dash").Value=280
getAddressList().getMemoryRecordByDescription("side-dash").Value=280
getAddressList().getMemoryRecordByDescription("forward-dash").Value=400
end
t=createTimer(nil, false)
timer_onTimer(t, d2)
timer_setInterval(t, 260)
t.Enabled=true
createHotkey(function () timer_setEnabled(t,true) end, 16)
|
So, I want that effect:
when I press shift, 3 values from my adress list will change to 2500 (function d1), after 260 miliseconds from shift press, those values will automatically change to values from d2 function (btw those are default in-game values).
I get only half success - indeed it works, but not all the time... Sometimes values gets changed with delay, sometimes values are not even changing after key is pressed, or even after "spamming" shift key - it's not acceptable for usage of this script.
So question is, is there something wrong in that script?
Thanks
|
|
Back to top |
|
 |
daspamer Grandmaster Cheater Supreme
Reputation: 54
Joined: 13 Sep 2011 Posts: 1588
|
|
Back to top |
|
 |
squerol Advanced Cheater
Reputation: 2
Joined: 06 Jul 2015 Posts: 65 Location: Poland
|
Posted: Tue Aug 16, 2016 3:37 pm Post subject: |
|
|
DaSpamer wrote: | Would recommend using script to setup hotkey (http://forum.cheatengine.org/viewtopic.php?p=5679193#5679193).
This should work
|
And indeed, it works PERFECTLY, seriously - finally I won't get annoyed by failed dodges caused by input lag anymore, thank You very much for quick and accurate help, DaSpamer.
Rep up of course
I love helpfullness of some people on this forum
Here is what evolved from that cheat table and simple auto hotkey script (normally there aren't any dodge system in this game)
https://youtu.be/JrNULOZEXBQ
|
|
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
|
|