HughJanus 244 Posted March 26, 2020 Share Posted March 26, 2020 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)? Quote Link to comment Share on other sites More sharing options...
LMS 674 Posted March 26, 2020 Share Posted March 26, 2020 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. Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted March 27, 2020 Author Share Posted March 27, 2020 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? Quote Link to comment Share on other sites More sharing options...
LMS 674 Posted March 27, 2020 Share Posted March 27, 2020 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. Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted March 29, 2020 Author Share Posted March 29, 2020 On 3/27/2020 at 6: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? Quote Link to comment Share on other sites More sharing options...
LMS 674 Posted March 29, 2020 Share Posted March 29, 2020 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. Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted March 30, 2020 Author Share Posted March 30, 2020 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. Quote Link to comment Share on other sites More sharing options...
LMS 674 Posted March 30, 2020 Share Posted March 30, 2020 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. 1 Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted March 31, 2020 Author Share Posted March 31, 2020 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? Quote Link to comment Share on other sites More sharing options...
Daylight848 7 Posted March 31, 2020 Share Posted March 31, 2020 7 hours ago, 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. Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted March 31, 2020 Author Share Posted March 31, 2020 13 minutes ago, 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.