I'm trying to simulate a compressor stall on my F-14A, but I'm a bit stumped on how to do it. I know how to use certain conditions to induce the stall by changing a multiplier on the engines from 1 to 0, but I'd like for it to stay 0 for a minute or so before going back to 1. I'm currently using a round(x) and smooth(x) function, which sort of works, but only causes a long stall after sustained high AOA. (How long you stay at high AOA is essentially how long the engine stalls.)
tldr; I need an FT code that changes from 1 to 0 for a minute or so based on some condition.
So... how do?
OR I could have the engine stall permanently, which I do know how to do.
In the mean time, here's some more eye candy.
Here's the current code. The engine input is multiplied by this:
1-(GS > 25 & smooth(RollAngle,.01)<0 ? clamp01(abs(round(smooth(AngleOfAttack/50,.01)))) : 0)
The roll angle bit is arbitrary, but it makes only one engine stall at a time.
Wait a minute…… no. goose
Maybe you could do it with a PID,
pid( ( Condition1 + Condition2 + Condition3 ) / ConditionCount, Thrust, p, i, d )
more help on FT PID stuff
@ReinMcDeer this stalls for a certian amount of time
@V I already used the permanent engine stall solution, but I'll try that
Here's my take on it.
.
Since you want the engines to stall for a certian amount of time after a certian condition is met, we gotta use variables.
Var: Timer = clamp(Condition | Timer < 60 & Timer > 0 ? Timer-0.07 : Timer + 60 , 0 , 60)
.
Var: Condition = smooth(AngleOfAttack, Y) = X
.
Then add this to the end of your engine inputs (replace X with your current engine throttle code and Y by how fast you want the engines to react):
.
X - smooth(Timer < 60 ? 1 : 0, Y)
.
.
.
The timer is roughly 15 seconds long, change 0.07 to any number to suit your needs, the higher the number, the faster It will count and vice versa, with the number being subtracted from the timer Timer each frame.
.
Since I don't know what conditions you want for this, just replace Condition with whatever conditions are needed for the stall as long as it's a True/False statement. The Timer will activate as soon as the statement returns true, even if it is only for a single frame
.
Here is an example build that uses the code
@Grob0s0VBRa @MrGreen Thanks for the help. I couldn't get them to work though, although I'm probably just being dumb.
@MrShenanigansSP It's actually pretty hard to put this one into a flat spin even with assymmetric thrust
.
I tried using a new set of FT that turns off the engines permanently after 30 seconds of sustained 25+ degrees AOA at less than 540 km/h GS with full burner. I think it's a pretty good balance since in order to induce the stall, you really have to try to do it on purpose
t
Top gun
T
My try:
* floor(smooth(1 * ceil(smooth(clamp01(TAS less than 210 | AngleOfAttack less than 9.7 ),0.93)) , (pow(10,4)/clamp(pow(10,4)* ceil(smooth(clamp01(TAS less than 210 | AngleOfAttack less than 9.7 ),0.93)) ,1,pow(10,4)) )/60 ))
Where:
clamp01(TAS less than 210 | AngleOfAttack less than 9.7)
- conditions for switch; change them as you may need.0.93
- delays switch activation60
- how much time it takes for switch to go back to 1Kinda works.
T
Snowflakes has made a delay script
it's something like this:
clamp( -%DELAY% + smooth( %CONDITION% ), 0, 1 )
You could use -TAS>180 + AngleOfAttack/15 you put this on the activation group of one of the engines (I would put it on the left engine)
.
Edit: just read the entire forum I do not know how to make it stay like that for a minute
.
Edit 2: I think you don't really need a delay for the code since your still pulling high AoA while at low speeds since your in a flat spin
T