Jump to content
Rydygier

setWantedRPMRTD - Advanced Flight Model scripting issues

Recommended Posts

So, it may be due to my undisputed ignorance as for AFM topic, basically using this first time in my life, still, I had a reason to test some of these commands, and either these are bugged, either I do not know, how to use them properly. 

 

First, enabled AFM in the game options, then in the scenario entered Hummingbird, used "engine ON" mouse action and watched:

 

  enginesRpmRTD (vehicle player) 

 

via the console. It reached [4000] and stabilized, so far so good. 

 

Then used this:

 

vehicle player setWantedRPMRTD [2500, 10, 0];

 

Expected value after 10 seconds is [2500], as I understand. But instead this value started to drop probably without end, I stopped the test below.... [-9000]. Yes, negative value, and dropping. 

 

Any ideas, how to reliably control heli's RPM via SQF in AFM 🙂 or I am doomed?

 

 

BTW tried also 

 

(vehicle player) setEngineRPMRTD [2500, -1];

 

does nothing at all as far, as I see. Also this:

 

stopEngineRTD

works in immediate manner (the heli freezes immediately). It's intended behavior?

 

Is there any RTD equivalent for usual engineOn command?

 

Share this post


Link to post
Share on other sites

As someone said to me and I confirmed just now, setWantedRPMRTD command seems "to push" RPM in proper direction (and probably with actual rate necessary to change RPM from current to desired value in provided time), just fails to stop at desired value, goes in linear manner indefinitely (?), therefore in order to use it to keep RPM at desired level one need to repeat that command all the time, as it seems.

Share this post


Link to post
Share on other sites

Most likely, the game engine - and the AFM's constantRPMEngine mechanism in particular - fights with the command all the time, I believe. However, as I've just realized, you can do it without a loop. Steps to reproduce my workaround:

- have a MH6 standing at helipad with its engine at full power [4000rpm]

- vehicle player setWantedRPMRTD [2000,10,-1];
- if ((enginesRpmRTD vehicle player select 0)<2020} then {vehicle player setWantedRPMRTD [2000,7200,-1]; //two hours of dropping from 2020 to 2000 rpm, forgive my syntax which may be wrong, you just get the idea - I tested the approach a minute ago and it works somehow

Reg stopEngineRTD, I have to apologize as I misled you in our PMs inadvertedly.  It's most likely to keep consistency between the AFM and the damage system. In the light of quite advanced system such as AFM introduced into the game,  stopping a helicopter's engine(s) through command which immediately halts the rotation of the helo's rotors could be seen as... ekmh... inconsistent? 😉

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×