Posted March 26, 20205 yr While in slow motion, the physics go apesh*t and a force push of 50 suddenly equals a force push of 500 or so. I need to check wheter the time is running correctly or dead eye or the weapon wheel or some other time modifying feature is used. Is there a simple way to do that (with natives preferably)?
March 26, 20205 yr If there is no native you might be able to estimate it by using the game time vs real time. It is obviously not perfect, but might help in most cases.
March 27, 20205 yr Author The script refreshes every millisecond (because it creates actions which happen every 10 milliseconds or even more often, depending on chance), so I would need to know the time scale every millisecond and cant afford to wait a second to compare how fast time goes by. Or did you mean it in another way?
March 27, 20205 yr I did mean it that way, but you could maybe see if after 10 real life milliseconds the gametimer has not increased as much. I don't recall exactly how it works, but it might be sufficient.
March 29, 20205 yr Author On 3/27/2020 at 5:03 PM, LMS said: I did mean it that way, but you could maybe see if after 10 real life milliseconds the gametimer has not increased as much. I don't recall exactly how it works, but it might be sufficient. Could you lend me a hand and point a finger to the corresponding natives, please? Is the game timer the game clock? Does the game timer run slower when in deadeye or only the clock?
March 29, 20205 yr Try using GET_GAME_TIMER to measure how much time has elapsed in game-time. It should operate in milliseconds. If you then measure the same time using system-time (e.g. using the Windows API), it might allow you to tell whether it is running slower than expected.
March 30, 20205 yr Author Hm, I use the game timer already for my functions which apply forces. I thought that the game clock and game timer were two different values. I thought the cause of the weird behavior was that e.g. the game clock ticked 1 second (in slow motion) while the game timer ticked 3 seconds and thus applied 3 times the force in this 1 second of game time.
March 30, 20205 yr They are different values, but the game clock is the "world time", e.g. 6 pm in the game. Game timer is the time in milliseconds since that game itself has started and it scales with the timescale. So when you set the time scale to 0.1, the game timer no longer match real-time milliseconds, but 1/10 of that.
March 31, 20205 yr Author Thanks for the clarification. Then I have another problem now - I dont know the root of the weird behavior anymore^^ Because I do all my stuff based on the game timer. If the game timer slows down with the game clock, why is more force being applied during slow motion?
March 31, 20205 yr On 3/31/2020 at 4:30 AM, HughJanus said: Thanks for the clarification. Then I have another problem now - I dont know the root of the weird behavior anymore^^ Because I do all my stuff based on the game timer. If the game timer slows down with the game clock, why is more force being applied during slow motion? You can try multiplying the force with the games time scale, to have some consistency.
March 31, 20205 yr Author On 3/31/2020 at 11:54 AM, Daylight848 said: You can try multiplying the force with the games time scale, to have some consistency. I was rather thinking about a solution like: if (timescale = 1.0) apply force But I havent found a timescale native yet. Actually it is like this: cur = get game timer tar = cur + amount of time the force shall be applied while (game timer < tar) apply force With this code, peds fly around like crazy while in weapon wheel or dead eye :D
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.