Andrew decided to call the new inputs system I cooked up "funky trees". Somehow escapes me why, but I'll roll with it. Here I'll describe what you can do in the land of funk.
Essentially what this means is that you can enter any mathematical expression (following this syntax) into an input field and it will be evaluated every frame. You can pull in data from a variety of sources, and process these how you like.
Inputs
What you can now do is use the normal input axes:
Pitch
Roll
Yaw
Throttle
Brake
Trim
VTOL
LandingGear
FireGuns
FireWeapons
LaunchCountermeasures
Activate1
Activate2
Activate3
Activate4
Activate5
Activate6
Activate7
Activate8
Flight data
In addition to this you can access some information from the aircraft:
Altitude
- Aircraft's altitude in metresAltitudeAgl
- Aircraft's altitude above ground level in metresGS
- The speed relative to the ground (m/s)IAS
- The speed relative to the air, adjusted for the desnity of the air (m/s)TAS
- The speed relative to the air (m/s)Fuel
- The amount of fuel remaining as a proportion of capacity (0 to 1)AngleOfAttack
- The angle of attack (angle airflow vertically meets the boresight) in degreesAngleOfSlip
- The horizontal equivalent of angle of attack (degrees)PitchAngle
- The pitch of the aircraft (degrees)RollAngle
- The roll of the aircraft (degrees)Heading
- The heading of the aircraft (degrees)Time
- The time since the level loaded (seconds)GForce
- The acceleration and gravitational "force" acting on the cockpit in G. I know it's not a force. Shut up.VerticalG
- The signed vertical component of the "G Force".SelectedWeaponName
- The name of the selected weaponLatitude
- The North/South position of the craft (metres)Longitude
- The East/West position of the craft (metres)PitchRate
- The pitch angular velocity in degrees/secondYawRate
- The yaw angular velocity in degrees/secondRollRate
- The roll angular velocity in degrees/second (these 3 inputs are better than usingrate(PitchAngle)
etc, because they account for wrapping around the angle, as well as being in local space:rate(Heading)
is different toYawRate
)TargetSelected
-true
if a target is selected, elsefalse
.TargetHeading
- the heading to the selected target in degrees.TargetElevation
- the vertical angle to the selected target in degrees.TargetDistance
- the distance to the selected target in metres.
Constants
Values that are always the same:
pi
the mathematical constant pi (half a tau, if you will).e
the mathematical constant e.true
a true boolean valuefalse
a false boolean value
Operators
These are useful for... maths or something.
- Mathematical:
- +, - addition and subtraction (- can be used as a unary operator, for instance
-Pitch
- *, / multiplication and division
- +, - addition and subtraction (- can be used as a unary operator, for instance
- Comparison:
- <, > less than, greater than
- <=, >= less than or equal to, greater than or equal to
- ==, != equal to, not equal to
- Boolean:
- &, AND
- |, OR
- !, NOT (this is a unary operator)
- Ternary operator:
condition ? value_if_true : value_if_false
- this chooses between two values based on the condition.
Functions
Finally, there's some helpful functions to do maths for you!
abs(x)
- The absolute (positive) value of x.ammo(name)
- The amount of ammo of the weapon withname
. Remember to put the name in " quotes.ceil(x)
- x rounded up to an integer.clamp(x, min, max)
- x clamped between min and max.clamp01(x)
- Equivalent to clamp(x, 0, 1).deltaangle(a, b)
- The shortest angle delta between angles a and b in degrees.exp(x)
- Returns e raised to the power of x.floor(x)
- x rounded down to an integer.inverselerp(a, b, x)
- Calculates the linear parameter t that produces the interpolant value within the range [a, b].lerp(a, b, t)
- Linearly interpolates between a and b, by a proportion of t.lerpangle(a, b, t)
- Similar to lerp, but interpolates correctly when values pass 360 degrees.lerpunclamped(a, b, t)
- Similar to lerp, but doesn't clamp the value between a and b.log(x, p)
- The logarithm of x in base p.log10(x)
- Equivalent to log(x, 10).pingpong(x, l)
- "Ping-pongs" the value x so it is never larger than l and never less than 0.max(a, b)
- The largest value between a and b.min(a, b)
- The smallest value between a and b.pow(x, p)
- x raised to the power of p.repeat(x, l)
- Loops the value x so it is never larger than l and never less than 0.round(x)
- Rounds x to the nearest integer.sign(x)
- The sign of x (1 if x positive, -1 if x negative)smoothstep(a, b, t)
- Similar to lerp, but with smoothing at the ends.sqrt(x)
- The square root of x.sin(x)
- The sine of x (degrees)cos(x)
- The cosine of x (degrees)tan(x)
- The tangent of x (degrees)asin(x)
- The arc-sine of x (degrees)acos(x)
- The arc-cosine of x (degrees)atan(x)
- The arc-tangent of x (degrees)atan2(y, x)
- The angle in degrees whose tangent is y/x. In other words the angle (argument) of a vector
Memory Functions
These are functions that are special because their output not only depends on inputs but their previous state.
- sum(x)
- Returns the sum of all it's inputs over time (the integral of x)
- rate(x)
- Returns the rate of change of x relative to its value last frame (the derivative of x)
- smooth(x, t)
- When loaded, it's output is set to x
. As x
changes, the output tries to move to x
, but at a rate of no greater than t
. This is vaguely equivalent to changing the speed of a rotator.
- PID(target, current, p, i , d)
- Evaluates a PID controller with the setpoint of "target", process variable "current" and the gains p, i, and d. Equivalent to: p * (target - current) + i * sum(target - current) - d * rate(current)
With all of these at your disposal, I'm excited to see what kind of contraptions you guys come up with, and I'm also open to some suggestions as to some things that could be added.
-WNP78, your funk master.
@ChaseplaneKLWith1MG Idk how to funky but what ive been doing is just looking for builds with landing gear doors that actually open, especially ones with delay and kinda reverse engineer the code.
Does anyone know how to make a hinge open immediately but close after a delay? (Need to know for Landing Gear doors)
@LitoMikeM1 or if a button can launch countermeasures and change a variable at the same time then maybe ja
@vSoldierT sorta like how if a button is set up to do countermeasures it only does countermeasures once per like second unless if you spam the button
@Flyinguy It doesn't seem to work, well you just need to put in the hook input, (AltitudeAgl < 60?1 * clamp01(GearDown):0)
the multiplication is a check if GearDown is true or false, that is, if GearDown is 0, it will be 10=0, if GearDown is true, 11=1. And remember to use AltitudeAgl, which is more precise (I tested it on your f-26 and it worked).
@vSoldierT It’s OK. I tried LandingGear & Altitude<60 & Activate8. But it was actually GearDown or something similar. But I dont think the * would work, isn’t that multiply? Anyways if you want to see the tail hook it is F-26 better.
@VargasSoldierT Thx, it still doesn’t work tho. I’ll make a post about it later with the plane. :)
@LitoMikeM1 I didn't understand very well, if you can explain better I can help
@Flyinguy AltitudeAgl<60?1*clamp01(GearDown):0
I need help with an auto tail hook, I need it to deploy below 60 meters AND when the gear is deployed
@LitoMikeM1 I already figure it out thanks
@G2027RR do you want it to not pitch up too drastically at high speeds?
how do I make a button instantly go up after being pressed? or at least make a bool that says true the moment the button is pressed, but stays false even when the finger is still on the button until pressed again?
How do I make the pitch of my aircraft change based on the speed
It's a fighter jet and the funky code for the mother of the back wings is (Pitch+Yaw-Brake)
@LitoMikeM1 smooth(clamp01(group),x)
@LitoMikeM1 thx
How to delay piston, like when I activate there's a 2 second delay, when I deactivate there's no delay
I'm kinda new to this game to be honest.
@CDTX2011 (smooth(LandingGear, 0.875))*-1 or sign(smooth(LandingGear, 0.875))
how do you make a rotator that's constantly rotating when firing weapons, but FREEZES (doesn't reset to zero) when you stop?
Part of the code for the guns on the
B-25J Mitchell: https://www.simpleplanes.com/a/hoGyGV/B-25J-Mitchell
I’m trying to add the bombarder’s nose gun to the B-57B canberra: https://www.simpleplanes.com/a/9N4V17/B-57B-Canberra
Distance/800) * sin((TargetElevation + 90 + rate(TargetElevation) * TargetDistance/800)) * cos((TargetHeading - Heading + rate(TargetHeading) * TargetDistance/800))) + sin(-PitchAngle) * ((TargetDistance + rate(TargetDistance) * TargetDistance/800) * cos((TargetElevation + 90 + rate(TargetElevation) * TargetDistance/800)))) < 0) ? (((sin(RollAngle) * sin(-PitchAngle) * ((TargetDistance + rate(TargetDistance) * TargetDistance/800) * sin((TargetElevation + 90 + rate(TargetElevation) * TargetDistance/800)) * cos((TargetHeading - Heading + rate(TargetHeading) * TargetDistance/800))) + cos(RollAngle) * ((TargetDistance + rate(TargetDistance) * TargetDistance/800) * sin((TargetElevation + 90 + rate(TargetElevation) * TargetDistance/800)) * sin((TargetHeading - Heading + rate(TargetHeading) * TargetDistance/800))) + cos(-PitchAngle) * (-sin(RollAngle)) * ((TargetDistance + rate(TargetDistance) * TargetDistance/800) * cos((TargetElevation + 90 + rate(TargetElevation) * TargetDistance/800))))>0) ? 180 : -180) : 0
@TateNT34 probably some parentheses out of place, if you can send the code, I can help
@VargasSoldierT What does “ Variable error: Stack empty “ mean?
@LitoMikeM1 yes, using a variable for example, name Increment = Activate4?clamp(smooth(increment+0.01,0.01),0,1):
clamp(smooth(increment-0.01, 0.01),0,1) smooth, keeps the increment rate at 0.01, and clamp, to keep it between 0 and 1
so uh how do you invert "smooth(LandingGear, 0.875)" cause i'm trying to use reszied airbrakes as landing gear doors(inverting normally make it deploy while the gear retracts and i want to make it so they both deploy at the same time)
is there a way to make a thingy go from 0 to 1 when an AG is activated (or from 1 to 0 when deactivated) in a linear curve instead of instantly going?
@TheVizzyLucky ngl i didn't read your name and I was thinking “at this point, just get juno” lol
@sennpai114 they tell you the distance between the target you are tracking what direction they are going in and how high they are.
Does anyone know what do rate(TargetDistance),rate(TargetHeading) and rate(TargetElevation) actually mean? I only know they output signed numbers
I'm trying to do a thing for radar try GPT isn't really helping me that much track DPT gave me this as a funky tree round(smooth(rand(100, 300), 0.5)) + " MPH" I'm trying to make my label go a random calculator speed between 100 mph to 300 mph randomly
@griges How can I do that? I can only cycle between Roll, Pitch and Yaw.
Edit: Made it work using XML editing now, Thanks!
@TheVizzyLucky just use +
put the
Roll+calculatedValue
in each wing's control surface@HordTechnicians idk how to activate camera
i dont think theres a way
How exactly can I use this to control aircrafts? I'm trying to automatically control the Roll with a dynamically calculated value. These calculations work fine, but I can't get them to do anything. So, if the value is calculatedValue and the Input I want to control is Roll, what do I have to use as Variable Name and what is the Expression (my first thought, Name = Roll and Expression = calculatedValue, didn't work)? This is probably a dumb question, but I'm coming from JNO where the programming system is... different.
@griges I’ve been testing with trying to add input and playing with the variables but nothing worked
@LitoMikeM1 i tried using smooth(Activate1,0.1)
but it delays only whaen turning off ag, not turning on
I wanna make inlet that come out when engine start, thank you :)
@HordTechnicians idk but maybe using a (heavily xml-edited) piston would do the job? (this probably isn't the best method but yeah)
@HordTechnicians not that i know of
try make new forum asking about it
i wanna know too
Is there a way to make a variable change a few seconds after an AG is activated?
@Sumrandomdud np!
Does anyone know how to make a camera automatically activate with a variable such as Activate1
@griges oh alright tysm for helping us :D
@Sumrandomdud if max roll too
wherever you put Roll controll
example a turning wheel
VTOL=1? 1 : 0
The input will be 1, full turn to right
edit;
if you mean Roll disabled untill if VTOL at max
just put
VTOL=1
in the activation groupim asking from here again, sorry
But how do you make it so if the VTOL is at max,it enables roll?
@Gerald19 my English is not good, but, you want activation group, but dont want to use Activate1-8?
just use button or switch
and change input to
ex; i want to activate engine 1, i set switch input to
eng1
and add custom variables,eng1
with value 0 or blankand change engine input from anything it was and add
*(the switch variable you use)
so originallyThrottle
toThrottle*eng1
edit:
if when turning on switch or buttons, cannot turning it off again
edit button xml input ,
interractionType
set toToggle
@griges I want to make a custom activation group so I don’t have to use the activation groups, and I want to make a custom activation group
@WNP78 can you add atan3?
Description
Calculate the angle between a vector and y-axis, not the x-axis as in atan2
Usage
atan3(x, y)
Arguments
x
The x coordinate from the (x, y) locations.
y
The y coordinate from the (x, y) location for an organism.
@MSLITecnik methamphetamine?
jk yeah i also kinda understand a little about theFT but the math, i need to learn more
Somehow i don't understand the meth of FT
@plenz4life If the Slats are moving up, use invert on the rotator/hinge rotator!
clamp01(abs(AngleOfAttack/30))
@griges oh alright thx dude
@Gerald19 what custom input
@Sumrandomdud if for flaps, clamping vtol down just
clamp(VTOL,-1,0)
I’m trying to figure out how to make a custom input
guys how do i use clamp in a line of code?
Like i wanna combine vtol and clamp
Can anyone explain how to make a rotator to move using the activate commands in the input variable?
can someone tell me how to do the leading edge slats
Nvm but for infinite ammo for guns are
ammoCount section
Just type -1
@NGC543 ???
@MobileBuilder21 it has look on Overload
@Palash Throttle<=0.9?Throttle:0,If it doesn't work, delete"="
How to make the engine active at 0-90% throttle and inactive when more than 90%
How can you display ias on text in kph?
@BlackBanan наконец-то ру чел) Наведись на камеру, и нажми на кнопки справа, которая выше шестерёнки. Появятся дополнительные кнопки и среди них нажми на самую верхнюю. Тебе откроется менюшка и найди там пункты LookPitch и LookYaw. Дай им название (Пускай будет на LookPitch "LoPi", а на LookYaw "LoYa"). И впиши на ротор команду с названиями и подели число на градусы ротора
@ChaseRacliot Get a rotator with an angle max of 90
Make it’s input “(TargetHeading-Heading)/90”
hello, help me how to make sure that when I press a certain button, my plane does not rise above a certain height
Is there any way to make the rotor turn it direction to the locked target?
yo im aking a mode on a plane to automatically stay lowand my throttle is stuck at what it was when i left the low to the ground mode outside of this mode. Can someone help? This is my code: (Throttle(Activate5>0.3 ? 0 : 1))+((1(Activate5>0.3 ? 1 : 0))/((AltitudeAgl/5)*(Activate5>0.3 ? 1 : 0))) I think it has something to do with the way engines work but still. I should be able to control the throttle. BTW im using the old simpleplanes prop engines so that might have something to do with it
@laquatra5 hello
I'm making a human (yeah...) and I need to make fully moving legs when you using the W A S D or pitch & yaw. How do I make the system, what when you moves pitch down, moving the top part of leg, under knee part and foot, and making the other body moving?
Pls reply
Hello
@Wallaby
@PlanerIndustries9
@GeneralCorpInc create a variable that doesn't depend on LandingGear
tnx bod!
anyone have any ideas how i could put some FT on a engine that limits its top speed intul something is then activated. I'm making a manual transmission car to go with my g29 wheel.
I got a variable named this:maxForwardThrustForce
@ACEVIPER9710 I gave up on that old project, now i need a way to make it activate below a certain altitude, for my nuclear bomb’s Parachute on my Tu-95.
@SamuelC (AltitudeAgl/(value) * (activated group)
Как сделать так чтобы ротор или объекты с управлением "pitch" Поворачивали вслед за камерой игрока?
How Would I Make Something Activate At A Certain Altitude
@SamuelC pitch+yaw or You can do pitch -yaw
Is smoothstep(a b,t) equal to a+(b-a)(3clamp01(t)clamp01(t)-2clamp01(ttt)) ?
How GForce and VerticalG is calculated in-game? Is it possible to calculate them for a local flight computer?
@djakaviation thanks mate
@PlanerIndustries9 ;0.0 after value
What is the funky trees input to round an input to the nearest tenth?
Is there a specific funky trees input code to invert only one of the inputs?
How Would I Be Able To Make A Pitch Control Surface A Yaw Surface Aswell?
@PlanerIndustries9 Wing gun doesn't have ammo only cannon
What is the ammo input for the Wing Gun?
How can i make the gear get back in their bay over a certain speed?
I tried the expression LandingGear|LandingGear * clamp01(IAS * 3.6<487)
Didn't made any changes...
@WNP78 thanks, that's working now
@JA311M condition is any boolean (true/false) value. See the operators section - comparison operators produce a boolean value, and there are also boolean operators that can combine multiple
is there a working condition list for [Ternary operator: condition ? valueiftrue : valueiffalse - this chooses between two values based on the condition.]?
So I'm trying to use ft for a tank gun because I don't want to us gyros so how would I do that so the turret is stable while it turn but the turret will still be facing north and gun angled at 2° @WNP78 or whoever can help
@WNP78 i have a jet that i want to activate if IAS<130 and AltitudeAGL>0. Help me! Ive got it to work with just the IAS bit but not both help
EDIT: nvm i got it i forgot that it was AltitudeAgl not AltitudeAGL
@Guywhobuildsstuff go to XML ( must activate on the mod section) , change the input to "Activate1"
@Realturtlecat I think the jundroo thinks us using phone in 2014 tho
@WNP78 how do I even make a Anti Ship / Anti Ground Target Missile ( call it as P-700PM1 Bazalteer ) i cannot code the detacher. I use the example of P800 "Oniks" and I copy the code on Detacher on another ( original not modded ) detacher , after I done and click "✓" and I goes back to XML to see , it didn't work ( I mean at "Group" )
@WNP78 Thanks!
@WNP78 im trying to make a working reverse thrust variable for my ATR-42,
smooth(Brake , 0.5)*clamp01(GS > 30)
is what I have right now but how do I make it so it activates only under 100m agl? Do I add*clamp01 (AltitudeAgl >100)
or is it something else?@MyNameIsAXY it's in the "memory functions" section
@WNP78 do you know what 'smooth()' means? I can't find it up there.
@Jerba x was just a stand in for whatever you wanted to drive the sine based on. In the example below I set it as
sin(sum(Throttle))
, with no x. Of course you can multiply throttle by a constant to change the frequency of the wave and multiply the whole expression to change the amplitude@WNP78 do you know what x is actually set to? Could I replace it with 1? Juno doesn’t seem to register x as a variable and I’m trying to do clamp01(x Throttlesin(sum(5Throttle) (I’m not sure what the exact format for clamp should be idk if it’s a separate statement like clamp01(x)Throttle or if it should be one statement
@Jerba for that, you'd want something like
sin(sum(Throttle))
since you don't want it to go all the way down to zero when you throttle down, just stop where it is.@WNP78 Thanks man, so could I do sin(throttle*x) to do a wave that changes frequency based on throttle?
@WNP78 hey so you are an dev so can you tell me can you add like in-game ANDROID only for you mods you would make custom weapons and other parts that could be cool
@Jerba just sin(x) is enough for a sine wave. And yes it's mostly the same in juno, but some of the data you can access is different, and there's support for vectors
How to make a rotator have a delay time
how to trigger a piece
so i have put some smoke trailes and engines onto a custom missile but i want to set it so that the smoke and engines go off when i launch the missile but funky trees hurts my brain. any help?
@WNP78 Did you port Funky trees into Simple Rockets 2 or did someone else do that? I’m not sure if it works the same or how it works there tbh. [Side question, if I wanted to make a sin wave, would it be Sin(Loop(x))]? (Or ping pong, not sure which)
Those flight data IAS shows in M/S and Altitude shows in meter, can you tell how to convert them in to knots and Feet? Example SPD:{IAS;0000}
Can I bind a parking break button to Ag1?
I did Activate1=Brake
How would I have to change it to make it a toggle break?
@UssrLENINGRAD me sirvió demasiado, muchas gracias... Si tienes otros ejemplos te agradecería si los puedes pasar
@SLSD11ph nah
If you want to input funky,just read the body👍
@Softballyesssss not sure what you mean by the old way, there should be backwards compatibility for all crafts, so you're free to just.. do things the however the "old way" is and it should still work.
Can you revert it to the old way?
Paste this:
clamp01(AltitudeAgl<25)*sin(Time*250)
.
.
This blinks under 25m (Ground level and not sea level).
Change the altitude constant (25) to any alt u need.
@Legendarynoob123 hie again ,.
I give you code you can paste directly for simple purpose.
@UssrLENINGRAD hey, ummm it dose not seem to be working
@UssrLENINGRAD Thank you for your help, I can now continue my plane with some safety and comfort things for the “virtual passengers”
@Legendarynoob123
AltitudeAgl<[whatever altitude]?sin(Time*250):0
You can change the time multiplication to whatever number u like.
More the number Faster blink , lower number slower blink.
And how to make a delay code, thank you.
Has anyone idea how to make a low altitude alert for the beacon light? I am just new to the XML code or what this is called.
@Iamsam if its a build variable just click the button beside finetuner, if its a part variable click the part, open rotate menu then click variable output
@Eeoo is there a way to find the viable?
@Iamsam that means there's a variable in the build or one of the part if there's not it means something is incorrect in the code
When I copy funky trees code from a rotator on someone else's aircraft and paste in into the input on my aircraft, the rotator on my aircraft won't move at all. Any suggestions?
@Eeoo the only flight computer is the primary one. I'm trying to take the stabs off the original jet and make them a sub assembly. Does that still apply?
@Iamsam is there any flight computer/cockpit? if yes you must drag it separately and make it the EXACT relative position of the turret/rotator
I'm trying to make a funky tree rotator from somebody else's build a sub assembly, but when I drag out the rotator onto my build, it doesn't work at all. Anybody have any suggestions?
Hi I'm gonna ask some question
It is possible to make auto dump flares??(Like on F-111 in War thunder)With Funky tree??
@Stephen22 if you mean a ammo cap just set burst count to 1000 then set "TimeBetweenBursts" to 9E+37. If you mean 1000 rounds a second then put that in there if you mean 1000 per minute divide 1000 by 60 then put that number hope this helped good luck
@Stephen22 if you mean a ammo cap just set burst count to 1000 then set "TimeBetweenBursts" to 9E+37. If you mean 1000 rounds a second then put that in there if you mean 1000 per minute divide 1000 by 60 then put that number hope this helped good luck
Can someone give me the thing to be able to have it so my machine gun has 1000 rounds. It's the machine gun so it doesn't have a name
@Kerbango Look at the code for the in game hornet aircraft you should be able to steal that.
How do I get a Hinge rotator to go back to the 0 position without having to decrease throttle? And then it goes back to the max position at a constantly repetitively (For an ornithopter)
@Magma1358 use AngleOfAttack. It outputs AOA
@SirMonzue Here post the plane I'll see what I can do idk much but I can try
Can someone help please. I've been working in this all day and can't figure it out.
I have some doors that open for a Fuel Probe. However I need the doors to have a delay before when closing. It is set on Activate2. Can someone help please!
How do I show the AOA on screen
Is there an Funky trees input that we can use to turn on an indicator (light input or label) when an enemy locks on?
this crap can fry my brain in under a second just by looking at a funky tree plane
@Speedhunter i just had to figure out how to get the mod function. never needed it before in my 7.5 years of playing this game. what a coincidence :0
turns out the repeat() function does exactly that ^^
How much of this functionality and syntax for inputs is also usable from a funk block? Ideally it would be the same across both as made sense
@WNP78
Actually, it might be easier just to show you what I mean on an unlisted post, if that's alright with you.
@WNP78
Thanks!
Another question,
I have:
{GunRateButton != AcmCover?"<alpha=#FF><color=#FF0000>HI":"<alpha=#20><color=#000000>HI"}
{GunRateButton != AcmCover?"<alpha=#20><color=#000000>LOW":"<alpha=#FF><color=#FF0000>LOW"}
How can I make it so if
AcmCover
is turned on then GunRateButton is turned on, whenAcmCover
is turned off it still displaysLOW
?Sorry if this is difficult to understand, I didn’t explain it very well.
ALSO, would you mind how I could use the same
{value ? "" : ""}
format with which weapon is selected… if you don’t mind? :)
@LoneSpaceGaming with boolean values,
!=
is logically equivalent to XOR@AristocraticFeelings
It should be:
{(TAS < 270) & (AltitudeAgl > 0) ? "<alpha=#80>STALL" : ""}
Make sure you are using "" and not “”
I’ll go check that this works.
Edit: It works. And if I were you I would personally use AoA instead of airspeed, but you do you. Also, I would suggest lowering the stall speed WAY down.
Is there anyway to have XOR?
@EJBoss97
I don’t think you can change inputs on things like that.
is there a way to use variables to make a countermeasure pod fire off when the machine gun input is pressed?
@WNP78 is there a modulus operator? (akin to % in other programming languages)
Where I can say
((ammo(name)%2) == 1) ? FireWeapons : 0
Basically the input FireWeapons only works when the number of ammo is an odd number
@darthgently in SP there is a menu you can open that allows you to create custom craft-level variables. You can enter the name of the variable, followed by a value it will be set to every frame. If you press the button to expand the full properties, you can also set an assignment priority that can change how it will act if the same variable is written to from multiple places, and also a condition which the variable will only update if said condition is true. In order to "set" a variable when something occurs, you can just make a setter with the condition set to only run that line when the condition is true.
I was reading that wrong. That clarifies. But what is this "variables system" you refer to? Variables can be assigned within funk? As in not just assigning the result of funk in a set variable block?
@darthgently yeah, you can't really do it with PID directly. In the post it shows how you can deconstruct PID into sum and rate, so you'd use that
NewSum
in its place@WNP78 From description of PID() it appears to rely on sum() for the integral so I was hoping to use PID() with some not yet documented way to reset sum(). I'll roll my own in funk and consider the solutions you describe, they all look promising. The last one does seem to leave sum() with its accumulated value though if I'm understanding how it works
@darthgently There are a few ways you could achieve that kind of behaviour.
One is to use the
smooth
function, which would have a conditional expression in both arguments. In normal mode the target point would be something likesign(x) * a_big_number
where x is the input that would have gone tosum
, so that the smooth is always moving towards that very far away target in the direction you want it to go, and the max movement speed isabs(x)
, so the speed the input changes. When in reset mode, the target value would be zero, and the speed would be set to a really high number so it can reach zero in a single frame.The second way would be to use the variables system to keep a zero value used to "calibrate" the sum, kind of like how a digital scales calibrates. It would look something like
RawSum
:sum(x)
SumZero
:RawSum
with the condition set to only run this line when you want to reset itNewSum
:RawSum - SumZero
Is there a way to reset sum() to alleviate windup in PID()?
@AristocraticFeelings
Yes, why is the stall at 972 kmph😭??
The tas unit used in these functions is in metres per second,not kmph
So simply:
{(TAS*3.6)<270 ? {(AltitudeAgl)>0 ? "<alpha#80>STALL" : "" : "" }
@Voidchaser
smooth(clamp01(Landing gear),1/3)
After the comma, 1/how much delay you want in seconds ,here I gave it 3 second delay.
If u have further questions,mention me .
@Yish42 i mean how to make speed limit on engine or wheel some vehicle are very fast
{(TAS)<270 ? {(AltitudeAgl)>0 ? "<alpha#80>STALL" : "" : "" } Can someone help to this goddamn stupid funky tree code
How do I make a landing gear hinge rotator have a delay
Are you going to add some kind of variable which tells you whether the enemy has locked you or not?
@theNoobCountry2 很好勇士,去闪击波兰吧
@Minn what is the problem?
Someone please tell me how to edit ground engine speed i very bad at math
.
@AdValorems go into the missle's xml and create a maxSpeed argument, set it to a number (i forget what unit the speed of measured in)
Hm
How would one go about coding, say, missile speed/velocity? Say, for making a Kinzhal?
Pitch
@Surkey OK, that's pretty easy to do. Just set the light's input as IAS=>343. That should make the light come on at and after Mach 1.
@Raptor77 I want to have a light that turns on at and above mach 1, and turns off below mach 1
@Surkey What kind of light? Like, a light that turns on at a certain mach, or something different?
hey can someone help me make a mach indicator light?
@WNP78 i realised that like 20 seconds after i posted that
And is it possible to use this menu to make a properly working machine gun of Gatling system, even if the real one will be one gun, and the barrels will be 8?
@thatsjustmidofficial RollInput is just Roll
need to add RollInput YawInput and PitchInput so you can do RollRate*RollInput so you can make a system that removes all movment of the aircraft when an input is not present but will allow movement when an input is present (is possible with Rates but will stop movement if not divided even when there is an input), i know this wont exist because the game no longer gets updated but i still hope
if anybody knows how please tell me :(
Anyone know how to make a random number generator, that can generate numbers between 2 different numbers in funkytrees?
Immense skill issue. I like my tangents 2.
Hello, does anyone know how to make a G-Force indicator? I'm trying to put it directly on my 737
After reading this is my brain too much off course like Adam Air 574💀
@RGBuser you can try to see if any of the huds in the stock aircrafts or any downloadable content of an sign which shows if we have missile warning or is it been locked, and if you find the input for flares, you can put the code into it. I don't know what it is in FT but generally it would be like (if missilelock=locked, then=firecountermeasures) but as much as I remember, you would have to create these variables, functions and all, they don't pre-exist in the game
@WNP78 @windshifter1 Is it possible to detect objects approaching our aircraft?,Maybe that will help
@windshifter1 my bad sorry
@RGBuser You're supposed to say what you are tagging for in the same comment... otherwise its confusing.
@RGBuser I did a quick search and no one has previously done something you have asked about before - though many have tried
@RGBuser I am not sure... You could tag WNP78, an approachable and active developer and the creator of funky trees himself, and ask him.
@windshifter1 is it possible to create a new script Or variables for it?Or can it only be done with input sistem
@RGBuser As far as I know, no. There arent any inputs for enemy missile fire, only player missile fire.
@Kerbango Hi I'm a beginner, Can we automatically launch flares when enemy missiles approach
@Jemandx8 Ahh for that, 2 engine set to throttle, one with AG1 as input, back or front wheel connect to 1st engine, then other pair to the AG1 one. Change the HP in the second.
@Kerbango i meant car engines
@Jemandx8 have one engine set to throttle, using overload have second engine set to AG1 with throttle or VTOL as input, change exhaust color/size. Fine tuner it together. wrap fuselage around it, add intake. save to sub-assembly so you don't have to do this again next time, or at least have a starting point.
I want an car engine to have more power if i activate for example ag1 but i dont understand this so can anyone help me pls
@MasterPlanes101 you can use an if-function
x=y? true:false
x
is your parameter andy
the value it needs to be otherwise it wil outputfalse
Is there a function that waits until a value is true, or a way to make one?
@v51Cobra You can cap it by changing the value "maxAngularVelocity" In all your wheels. I don't know the exact value - you have to fiddle around a bit - but you get the general idea. As for changing when ag 3 is active, idk.
How would I cap a car engines speed? I have a car engine that I’d like to be capped at 155 mph unless group 3 is active where it would be capped at 310 mph. I can cap it at 155 or 310 but I can’t figure out how to have the cap change when group 3 is active.
@All first thing you wanna know about that:
*
When you want to change anything about certain words or symbols on your label, whether it be its color, size, position, etc, you put those things in between <> brackets. For example: <color=#FF00FF> if you wanted to make purple.
*
All of the changes to a set of characters in a label that I know of go as follows: <color=#------> <alpha=#--> <pos=0px><voffset=0px><size=1><scale=1><rotate=0>
*
Hope this helps some!
So my brain is basically melting reading this but I'ma try soon to make a HUD
@WNP78 WOAH! Didn’t think you respond that fast! Anyways, cool!
@Randomplayer andrew did
Why’d you name it funky trees?
Как сделать идеальную земля -земля/земля-воздух но не более 45 градусов поворот грубил по горизонтали?
how open\create LUA script in SP?
I'm just wondering how to put variables into stuff on mobile
oh heck yeah, very lovely. I'm a few years late to the party but thank you my good sir
@VoidGuardian Пр
@UkrainianAviator np
@VoidGuardian Thank You
@UkrainianAviator try WeaponSelected="weapon name" & ammo("weapon name")=5 ? 1 : 0
The missile name is a string value so you need to put the name in quotations.
What if I need to rotator open and missile activate when there is certain number of missiles left like 5 missiles left the 5th missile activating
@windshifter1
Well I know that ,but he said using that in FT , implying using {}in detacher,rocket etc. Where it dont have a purpose .........
@UssrLENIN {} is used for funky trees in places it would not normally be put. Such as text labels, it is expexting words but you want to put code so before and after your code you put {}
@CAS6041
No I think I know how brackets work 😕 but I don't use {} only (over(
No damned bodmas like[{(
@UssrLENIN the reason that i would need that is if u fire the rocket, a detacher release the seat, then when it reaches its apex,
a detacher releases the rocket, then the parachute opens.
@CAS6041 that's .... For texts .... In .?nie
WHAT?why would u need that ?
"{}" ? I have NEVER thought it is any use in an EJECTION seat.!????!!!!!!!1!1!1!!1!1!11!!1
@CAS6041 Bro ,some heads up ,u need to use "@" symbol before a guy's name to tage them making them get a notification that YOU have tagged HIM.
AND , wnp78 don't reply cause he's a main dev and as per I know , barely active in comments of this site
@CAS6041 Here is what my experiments brought forth. https://www.simpleplanes.com/a/bd5T8c/Aircraft-Rocket-Powered-Detacher-Seat
ill be online this afternoon
im good i just figured out u just need{} instead of ()
@CAS6041 Also to make someone aware you are asking them you write @ then the name
@CAS6041 I believe it is possible. There is a way to attach a detacher to a rocket so that when you fire the rocket, it stays connected. Attaching the seat as well. Then make the input of the detacher {FireWeapon}. I will experiment a bit and get back to you.
So WNP78, ive been building a ejection seat with rockets, could you make me a detacher that fires when you fire rocket?
@windshifter1 yeah do it it'll be better
@UssrLENIN I'll tag you if you agree.
@UssrLENIN Could you try actually testing it in the actual plane?
@UssrLENIN Sorry but it didn't work.
@windshifter1
Hmmm , give me sometime to think ,soo
Given :
{IDENT? (sin(Time-|asterisk or star symbol for multiply|-300)?hexa color code for yellow : hexa color code for green) : ""}
TRY IT . I just came up with it ......
No teste
And ofc if u wanna use ident as a custom group change button
_interactiontype_ to toggle and use IDENT instead of activate1 (these changes to be done in overload)
Aske me if have any questions.
@KtaAviation
Question mark (?) Is basically used in all codes like Java and xml for 1 function:
When the FT code inside the (?) Is true or outputs a value greater than 0 , the function 1 is executed,if not function 2 is executed.
Example: let's say I want something to open with AG1 ONLY when VTOL=1 ,so
VTOL=1? Activate1 : 0
Here 2 signs are important --
( ? ) And ( : )
Tell me if have any doubts or want specific code
@UssrLENIN Bow do you use the
?
function?I need a button in the cockpit (IDENT) to make a text label with the ATC transponder code flash.
1. How do I do this without an activation group used?
2. How do I make text flash green to yellow to green and so on until IDENT button disabled?
@1010HI1020
If u want any particular help with codes ,then u can tag me in this post so I may be able to help u
@SkyJayTheFirst @ToeTips
(GS * 2.2369)>100?1:-1
Here multiply by 3.6 to get in kilometres per HR and 0.621371 to get (approximate) value in miles per hour .
@ToeTips it's all good. I'm no expert, but I know a thing or 2.
@1010HI1020 I don't know how to convert the value to miles per hour, since it's automatically set to meters per second in the funky trees, but you would want:
*
GS>50 ? value if true : value if false
@SkyJayTheFirst
Thanks for this, helped me build some decent stuff, sorry to reply so late
How do I have something happed only when I’m over 100 mph
@ToeTips the format you want is as follows: condition ? value if true : value if false
*
For example: let's say I set something to do a thing when I activate 1. Therefore, I would put: Activate1 ? 1 : 0
@ART384 well when we name ammo variable as cammo ,then it's outputting a value ,Which value is number of countermeasures left in THAT particular part
@UssrLENIN but how is that supposed to work? we havent named that particular countermeasure part as "cammo"
How can I have multiple codes running?
Like if this happens do this . If that happens do that, etc?
@LAGDragon Here is a demonstration https://www.simpleplanes.com/a/DIx660/Test-Car
@linxiaofeng2339 just use Pitch and Angle Of Attack lol
How can I measure wheel speed?
@PPLLAANNEE Yes, first you can calculate the longitude, latitude and altitude of the target, and then calculate the corresponding angle through the Inverse trigonometric functions (these flight computers are required to return the longitude, latitude and altitude).
@ThatItalianDude You are wrong. The PitchAngle value only describes the nose pitch angle, not the Flight Path Angle (FPA), and you can only measure horizontal ground speed (measuring air horizontal speed is almost unrealistic unless you have written wind direction detection). There are two ways to measure the horizontal speed of the Aircraft relative to the ground:
1:GS > 0.001 ? (GS*cos(asin(rate(Altitude)/GS))) : 0
2:sqrt(pow(rate(Latitude),2)+pow(rate(Longitude),2))
@IzzyIA Ill probably use that thanks, but what Leehopard had was just a rotating ^. Points you in the direction you need to go to reach the selected airport. distance was in a seperate panel
@windshifter1 My GPS sounds like what you're looking for and uses no custom variables. Just copy the label to your craft :)
@UssrLENIN Well then lets ask @Leehopard how he managed to get a rotator to point in the direction of an airport, switching locations with buttons!?
@windshifter1 I'd suggest asking @IzzyIA .
@windshifter1 Make the damned locator ,yes but like it's a analog thing coz in lat/long-itude u can't use tgtposlocal and other stuff to make fancy digital pointers.
But I am not sure about buttons to switch between them.maybe .... Just maybe it can happen if we use custom commands.
@UssrLENIN tis is okay, thank you very much!
Is there a way to make a navigation system? I saw in one airplane where the is a ^ symbol that rotates on the panel to show the direction the selected airport is in. Using buttons to switch to different locations. I tried to copy and analyse the code but it used to many custom variables.
@ImTheNewGuy You can reply me on this comment if u want a dedicated post on this for clearer explanation
@ImTheNewGuy yes , hello .
So select your desired countermeasures part,then on left of ur screen on upper portion there is an x inside of a block.Now click on it and then u will be shown list.here only one.name the variable as u wish for this case let's use cammo (note that capitals or lowercase spelling matters).now use normal code which being ==
---- ammo(cammo) ---
@KtaAviation Question not clear.
@Neruneten21 that involves activation groups
@Neruneten21 i cant because there already is code
@KtaAviation Just go to the part settings and change the activation group enabled, input and invert if its reversed.
@WNP78 Im trying to make an 2 engined vtol plane that rolls by increasing/decreasing
throttle while AG1 is pressed. Could you give me some code Please?
@windshifter1 ok thanks for the tips
@Skykid028 You can disconnect alls cockpit blocks from the main fuselage, and then all other parts will act as one. You can right click and drag to make a clone. If that does not work or you want it to be more permanent that you can use again later, drag the entire plane to the top left bin for sub assemblies. You can go to the parts menu, then click on sub assemblies to find it again.
Is there a way to just copy and paste everything at once instead of having to go through to copy and paste everything one at a time
can you make it display how many Countermeasures you have left? because I tried how you would do it for weapons and its not working.
@windshifter1 Nice! Thank you very much
@titaniciceberg3 Hope this helps customise your missile
@titaniciceberg3 Indeed. Select the missile. Open the overload in-game XML editor (In my prev comment right below, the last paragraph shows how to acces the XML editor). Click on the dropdown menu at the top. Select Missile. Then, instead of editing and existing value, go to the bottom and click the + sign. Put the name as maxRange (Must be exact, with the capital letter correctly) and put the value as whatever you wish. 10 000 is a decent missile range and 20 000 is a long range missile, but feel free to experiment with what suits best.
Here you can also edit the name of the missile, from the boring existing name to a fancier custom missile name like Sidewinder AIM-9. Simply add a new value with the name as 'name' (minus qoutation marks) and the value as the name you wish.
In this spot as well you can edit the power of the missile. Find an existing value with the name as explosionScale, then edit the value beside it. 5 is large, 20 is a small nuke, 50 hell get outa there, 100 I hope you sent the expendable guy.
Is there any way to increase missile range?
@KORKMAZ If it is a jet engine, open the Overload Mod (XML editor), go to the dropdown menu at the top, select 'Engine', then in the list of names and values that come up, change the value of 'PowerMultiplier' by whatever number you wish.
If it is a propeller engine, go to the part settings and use the slider to set the HP. If the slider reaches it limit, but the HP is not at the desired amount, go to the Overload XML editor, in the dropdown menu select 'PropEngineAdvanced', the in the list of names and values that appear, change 'Power' to whatever value you wish. Please note that 1000 HP is equal to the value 2000 'Power' in the XML editor. (its x2)
2 more things to note: Changing the HP will change the speed of acceleration, not the max speed. The max speed will stay the same. If that is what you wish to change, use a different engine.
The other thing: To access the OverLoad XML editor, go to the very first main menu with the play button. Click on MODS, then click on OverLoad. Then click the new button that appears to "Enable" the mod. This mod is pre-loaded when you downlaod the game. Now on the bottom right, beside the play button in the designer, there should be a button with: </> and then a plane symbol below it.
How can I increase the power of the engine from 600 HP I want to make 1000 HP
@UltraLight Thank you and yes i was just looking for it to turn on momentarily in the cockpit to indicate countermeasures launch, like an afterburner light
Funky Trees Question: I just noticed that all the cockpit blocks and the flight computer have position / attitude data and a few more points — can’t believe I never thought to check that before. But how come they don’t have ALL the normal flight data like altitude agl and all the target heading/elevation/distance data? Is there a way to access that for the non-primary cockpits?
@planeplane1212 it’s “LaunchCountermeasures”
That’s just going to be on for a moment though so if you wanted to make a light that shows when your flares are still live then that’s another challenge
does anyone know whats the input of the countermeasures
i want to make a light that turns on when you release countermeasures
@Mueheheh23 for the nth root of x you can do
pow(x, 1/n)
Ya got square root but where's the other roots?
@windshifter1 That seems ok to me
@UssrLENIN Dont do anything yet tho, Ill link you in an unlisted post of the aircrafts in construction, then you can fiddle around and touch it up if you decide you want to help
@UssrLENIN It would be a big help if I could have those radar codes, and for the static arts, I need shark teeth for a Fairchild AU-23 Peacemaker
@windshifter1 I do have some text codes for radars but i don't own them and are downloaded. If you want ,i can give them here.
As per of static arts , i am in middle of learning how to do it 😅
@UssrLENIN Wow thanks! I have a question - You seam pretty good at this FT coding, do you know how to make data screens like radars or nav systems? Or static fuselage art? If you are, id love to do collabs on builds, sharing the credit. I have a modern fighter jet, my masterpiece, id like help to code the interior. I know some FT and did a few data screens, but I still need the complex data screens. if you can help and are interested please reply.
@windshifter1 hey hey hey , UssrLENIN here again and i just resolved your code of missile firing .(https://www.simpleplanes.com/a/6Vs09W/M115A1-160mm-Howitzer is the code of the ammo loader which i modified to be shorter)
String:----
rate(smooth(ammo("Sui 25"),1/1))=0&rate(smooth(ammo("Sui 25"),1/(2.5)))!=0
Please note that put name of ur missile (here my test missile name was *Sui 25*). This code has a delay in lighting up .
Just use this in XML overload in input section of the beacon light
@CaptEarle591 maybe he wants the rotator to only rotate between pitch 0% and 30% instead of pitch 1- 100%. That could be the case.
@UssrLENIN I guess so, I understand my interpretation of the question. Did you interpret it different?
If I wanted to get an ai to face the player without the use of gyro, what would I have to put in?
@UssrLENIN little late for the competition but I certainly will include it into my updated version. Thank you!
@windshifter1
fireGuns and fireWeapons I believe.
@UssrLENIN Thanks for the help, I shall try it now
@CaptEarle591 Don't you think it's a wierd question to ask ,seeing it's so easy.... I think he wasn't able to express his question in the right way
@UkrainianAviator this is pretty simple. First you change the inputs with the settings button click it. Then you change the “Range of Motion” slider to 30 and the input to Pitch.
@windshifter1 uhhh missile fired cannot have a specific command . Only fireWeapons and it will hold for given time that button is triggered.
Though MAYBE ,just MAYBE you may be able to get a missile fired signal using the [rate()] feature .
@windshifter1 Sir , that's only for labels .
@SkyJayTheFirst No , that would be very complex to make it fade out smoothly.
But if u want I can tell you how it will appear AT ONCE if a condition is satisfied
@MrPanzer entire string of inputs for when to light up when a target is within 2 km ONLY
Modifie the conditional operators OR the range number to change the range etc ..
String :
TargetDistance<2000?TargetSelected : 0
@UkrainianAviator I didn't quite understand that?if u clear it i may be able to help you
What if I need to open my rotator by the pitch (negative and positive) But only to 30 degrees?
okay so I made it so it can lock on with the input as SelectedTarget, but I can't seem to figure out how to limit it to lighting up at a specific distance. any ideas?
What command would you use if you wanted to have a light turn on when you have a target lock. Specifically a target lock on another aircraft or ground vehicle that you're attacking.
Is there a way to have a rotator spin faster as pitch is applied, but doesn't return to its original position when at idle?
@windshifter1 Make the input for the light "FireGuns"
Is there any code that would turn on a beacon light whenever a weapon is fired? Like: Guns firing, red light turns on and holds for however long you are firing. And for missiles, light flashed when missile fired?
What equation would I use on a label that would allow letters to smoothly fade in or out, depending on the throttle?
@UssrLENIN uwooooghhh thanks for that comrade
@UkrainianAviator paste this in ur rotator;
SelectedWeapon="missilename"? FireWeapons : 0
@SpetzavodHeavyIndustries unfortunately,no.but u can get output when a particular weapon is fired only.
are there any funky trees that triggered when the bomb explodes?
@windshifter1 you can also use <> and put your code in between those, such as color, pos, voffset, etc.
@windshifter1 Also, I believe you failed to mention that all lines of code must be written in between these brackets: {} Anthing written outside of the brackets will just add on as normal text.
Very helpful guide, but there is one error. To access the name of the selected weapon, the code is {SelectedWeapon}, not {SelectedWeaponName} as mentioned in the Inputs section.
@UkrainianAviator i think you can do that if you set the rotator to "fireMissile" control, and giving the missile the delay that the rotator needs to open
What if I need my rotator to open only when I fire missile?
Anyone here know how to make something point at the target no matter the orientation? I'm putting a pilot and RIO into my tomcat and I need the RIO to look at the target, even when rolled to the side, etc. I have (Heading / 180) - (TargetHeading / 180) and TargetElevation in it, but it doesn't work unless it's perfectly upright. I have a rotator with a hinge rotator on top.
@LoneSpaceGaming Here take some code from this I am working on it a little bit more It takes some features from the F14 but it is not an f14.
Well I worked out some of the problems that you have been having so yeah here you go. https://www.simpleplanes.com/a/d1k9U7/FB-14
@LoneSpaceGaming On it
Help 'we'? come on me get your spelling together it's meant to be ME.
@F14FANATIC Since you're, well... an F-14 fanatic, could you help we with my F-14? It's not rolling well. At low speeds (roughly 200-450 kts) it rolls like an airliner, maybe even worse. Only the horizontal stabs are rolling the aircraft not the spoilers. I don't have the spoiled roll it because when the wings are back, it also pitches the aircraft up. Any ideas to make it roll better? I've tried xml shrunk wings that I manually enlarged (shrink using overload or finetuner or whatever, then used the 'edit wing shape' button to make it larger) and put them in the fuselage and I've tried in the wings too. (Both were like 90% aileron and 10% wing lol)
Sorry for the long comment, and anyone else who has any ideas feel free to tell me.
Your Mediocre Pilot,
Lone Space Gaming (Callsign Gizmo)
P.S. Yes I had to add the closing thingy at the end `cuz why not. And that was a lot of parenthesis.
@F14FANATIC VTOL>0 ? 0 : 1
*
With that basic control, if you pull the VTOL stick up above the middle, it'll set whatever is binded to it to 0. Hope this helps!
How do you restrict the output of something say using VTOL?
@DerKommandant unfortunately you cannot, as cannons cannot take input from funky trees (at least for now)
@SkyJayTheFirst Yeah, that's what I figured. It's too bad though :(
@LoneSpaceGaming I asked the same question months ago, since I also wanted to make a radar warning receiver. As far as I know, there's no way to do it, which kinda sucks.
I could have sworn there was a way to tell if an aircraft was locking on to you, but I can't see it here (not the beeping sound and the flashing text I mean for funky trees).
If anyone can help me with that I would greatly appreciate it, I'm making an RWR for my XV-5
@Promike Use the gauge and change the setting to what you want. Also use text an put for example {ceil(fuel)} this rounds your fuel percentage to an integer or a whole number
THis may be the single most destructive thing anyone at Judroo has ever done to SimplePlanes' status as "airplane game".
I just saw an interactive 3d shape on a text square.
This is unholy and truly I am jealous of the power it grants.
is it possible to make a cannon fire using the throttle? im trying to make a cannon propelled aircraft but I dont want to hold down the fire button for long
How do I display things such as Fuel or Altitude?
@Tyusha try use a clamp value like this
clamp01(sum(Pitch)1, 1))
I wanna control the rotator using pitch,but i don't want it keep coming back to it's default position, I've tried using sum(Pitch) it kinda work but i wanna set it's min and max degree so it's not keep spinning,how can i set the max value for sum or something similar to that
First you can go to pause then go to the airplane button with the 8 pointed star and click on it. Then click on spawn tanker the you got the rest
@CaptEarle591 in game beacuse there is a probe i can use but idk where is the tanker
In game the only way is to air refuel
@aeaeaeaeae What do you mean? In game or in the builder
idk how to add more fuel
@mitsuki or just go to the xml add a new slide and put throttleResponse l 0.05
@GKYGG of course you can!!
pls note i missed one closing parenthesis in my comment
@GorillaGuerrilla Can I use it?
Can AltitudeAgl input be put into a secondary cockpit, pitch input? And if so how? (need info on it for a project)
@Khanhlam It was an aerobatic aircraft that I was working on.
@F14FANATIC Is that an F-14? Yeah flat spin is normal in that plane.
@temporaryplanetester FT is only an expressions language, and if/else blocks typically group statements (instructions). What you can do if you want is to use the Activator field on a variable setter (click the downwards arrow to expand it) to only set a variable when a condition is met, and then have another setter for the same variable with the opposite condition. Or, if you want to format your code nicer, you could edit it in an external editor and split your ternary operators across multiple lines, like
Idea: Add an if else statement.
The ternary operator is cool and all, but it can make your code hard to understand if you chain a bunch of them together, so a multi-line if else would be nice to have.
@GorillaGuerrilla Thanks, man. THe roll reversal is more manageable now with the fixed thrust vectoring but it's still there. I'm about to go put this into my aircraft right now. Thanks again.
@LoneSpaceGaming heres the code for the hinge on my ailerons.
RollInput/1.25 * sign(90 - abs(AngleOfSlip)) - smooth(clamp(clamp01(AltitudeAgl > 2.85)*
(RYawOut*AngleOfSlip*2.2), -0.23,0.23),0.11)
note i actually made the roll reversal when the plane is flying backwards at angleofslip > 90. so lets say if u want the roll to behave the opposite when aoa is above 45 u might want to change that part right after rollinput to
* sign(45 - abs(AngleOfAttack)
it doesnt matter how u messed up ur design, this will eventually help u one day if u are making psm planes
I'm stupid, my thrust vectoring was going opposite to my afterburner, so even with afterburners on it did roll very well in PSM. So I guess when I hit around 15 degrees of AoA the thrust vectoring of the normal engine was enough to roll the aircraft in the opposite direction.
Anyone know how to invert the ailerons when above a certain AOA? My plane 5/6th gen fighter has roll reversals and I want to get rid of it, it just doesn't fit with a 5/6th gen aircraft.
@Misterrobertinho from my understanding, yes it is :)
@CaptEarle591 I just saw this and I've been Wondering how to do that thank you Sincerely - F14FANATIC
I made a plane that can identify if it's in a flat spin or not and which direction the flat spin is. I will eventually post that plane but in the mean time it's still in the making.
But if anybody Has any questions or wants to do this for themselves contact me at my discord (read my bio)
@CaptEarle591 Thanks, I'll test this on my build asap
@mitsuki smooth(Throttle, X)
Replace the X with a number
The smaller the slower the start
EX
smooth(Throttle, 0.05)
This is what I use
anyone know how to delay a engine startup? I want my VTOL nozzles slowly start up instead of going from 0-100 whenever I activate my afterburners
@Havonec ooooooohhh I thought you needed some complicated XML for it
@CatMasterLuke but for the cannon
@CatMasterLuke like where you press to edit fuselages
@CatMasterLuke btw you8 can make it mutirole in the non-mod settings
@GorillaGuerrilla I need context
*put
@GorillaGuerrilla when i out in the code nothing is happening
@Havonec i actually stumbled upon this to learn how to do it.
u can change the code so that its time sensitive to blink.
my rate of climb reading is rate based. just change it to
sin(Time * Anynumber) > 0
@Havonec i am pretty sure u have seen the hud on my plane to say it didnt u? to make things simpler heres the code involved in the presentation
<color=#ff0808>
<size=1.5><voffset=2.1px>{(AltitudeAgl > 10) & (rate(Altitude) < 100) & (0-(PitchAngle+5)/(2abs(PitchAngle+5))+1/2)(0-(AltitudeAgl-300)/(2abs(AltitudeAgl-300))+1/2) ? "Δ":""}</size>
<size=0.5><voffset=2.35px>{(AltitudeAgl > 10) & (rate(Altitude) < 100) & (0-(PitchAngle+5)/(2abs(PitchAngle+5))+1/2)(0-(AltitudeAgl-300)/(2abs(AltitudeAgl-300))+1/2) ? "!":""}</size>
<size=0.4><voffset=1.73px>{(AltitudeAgl > 10) & (rate(Altitude) < 100) & (0-(PitchAngle+5)/(2abs(PitchAngle+5))+1/2)(0-(AltitudeAgl-300)/(2abs(AltitudeAgl-300))+1/2) ? "TERRAIN":""}</size>
<size=0.4><voffset=1.3px>{(AltitudeAgl > 10) & (rate(Altitude) < 100) & (0-(PitchAngle+5)/(2abs(PitchAngle+5))+1/2)(0-(AltitudeAgl-300)/(2abs(AltitudeAgl-300))+1/2) ? "WARNING":""}</size>
</color>
<size=0.35>
<color=#22221111>{rate(Altitude) > 0 ? "<color=#08ff08>" : ""}<pos=4.45px><voffset=0.82px><mspace=0.15>{rate(Altitude)60;[00,000.]}
</size></color>
<color={rate(Altitude) > 0 ? "#08ff08" : "#ff0808"}><size=0.8px><pos=4px><voffset=0.48px><alpha=#FF>─
</color>
<size=0.35>
<color=#22221111>{rate(Altitude) > 0 ? "" : "<color=#ff0808>"}<pos=4.45px><voffset=0.42px><mspace=0.15>{rate(Altitude)60;[00,000.]}
</size></color>
</mspace>
</color></color>
@GorillaGuerrilla yeah like a Terrain warning
@MasterPlanes101 i just had this thought/design over my head that it may work haven't tried it yet but pls remind me later
@CatMasterLuke multirole
@Havonec do u mean quickly or slowly
Sounds like u want it to blink
Can I make a cannon that is compatible for both air to ground and air to air? I remember there being a way to do this but I can’t find the page
anyone know how to make a motor works immediately?
something like the rocket engines mod
no wait... i discovered how is so doesn't matter
you put in the engine (engine):
throttleResponse / 100
@ThatMG393 if you want it to stabilize then copy these and put them in the hinge Rotator make sure min is -4 and the max is 4 also make sure the range is 90
Yaw is no need
@ThatMG393 use a RollAngle or PitchAngle depending on its location and divide by the degree measure of the rotor
@Brandon182003 repeat(Throttle, 0.96)
anyone know how to make a text appear and reappear?
@Brandon182003
(Throttle > 0.95) ? 0 : 1
also changezeroOnDeactivate
totrue
Anyone know how to make a rotator always face up no matter if its sideways? Basically stabilizing.
Anyone know the code to make an engine deactivate above 95% throttle?
Nvm, try the same thing but in {} instead of [], sorry for the mix-up. @Sense2
Try [(Altitude)*”whatever the conversion rate is between metres and whatever you want the display to show”] @Sense2
I like your funny words magic man
how the heck do i make a working altitude indicator on my text
@MasterPlanes101
sadly no because the brakes for the wheels have no input field. you can only the change the input for the turning of wheels but not for the braking.
i tried to do the same as you wanted it but it doesnt work
So What Im Understanding Here...Is I Cant Make A Lever Control The Landing Gears...Or Can Someone Show Me How To..?
How do you have a gear hinge slow when it’s being closed and fast when it’s opening?
is it possible to make a wheel brake only at a certain speed?
Is there an input to show that you’re being locked up
@11qazxc with "holding shift" i meant like "while throttling up" btw.
is there maybe a way that when throttle is above 99, the throttle automaticly goes back to 99? or is there something that while my throttle is going up, it will output something but when my throttle is still, it output is 0?
thanks for the help :D
@DenizLion You can't use state of real hardware and you can't change user's inputs with FT.
max(0,rate(Throttle))
orrate(Throttle)?1:0
will work while Throttle's rising.Throttle=1?1:0
will work if Throttle's 100%@DenizLion or how can it automaticly throttle down to 99% after i release shift?
so the engine will only be active if the throttle is 100% but when i release shift the throttle automaticly goes to 99% so the engine will turn off
how do i make an engine / a beaconlight activate when i hold the throttle button (shift)?
i want to make an afterburner which should only be on while i hold shift
@Danidude88 Fill
SelectedWeapon=(THE NAME OF THE WEAPON HERE with a pair of double quotation marks)
into the activation group section (you may need to navigate in the pop-up menu atop the Overload window) of the rotator's Overload interfaceHow do I make a hinge only activate when a certain weapon type is selected, and the speed is low enough?
@BasicHam yes you can by basically replacing the input (via overload) to LandingGear
Can I set a hinge to act as a landing gear?
@Mondayhater just tested it, it doesn't work
@Mondayhater on the input settings, I think you need to set it as "IAS,TAS,GS=speed value in meters per second" I think. The IAS, TAS, GS, is for your preference, you need 1 of them, I'll test this out and get back to ya if it works
gente alguien sabe como puedo hacer que un rotor gire al estar a cierta altura?
How do you make an engine work only at a certain air speed
@WNP78 thank you. Abandoned the project in the meantime (didn't work), but I'll keep this in mind
@UPTOSPACE345 that's the
max
function -max(a,b)
is the greater of a and bHey, does anybody know how to make something that outputs the greater of 2 inputs? This would be immensely helpful
can activate1 + fireguns work?
@PersonOfTheUniverse9YT Thanks
@KdogUSA Altitude <= 5
How to combine fireweapon with selected weapon
270th Upvote! And this is really helpful, so thanks.
Can I make a Gyro work only if i am under 15 ft or 5m
@gghelllll sadly. You need to use green lights. Or use a mod but if your in mobile then green lights.
Can we get ways to affect VTOL and TRIM with buttons. Probably with a step or slow increase kind of function
It would be really handy for electronic trims and other gear that use buttons instead of a lever
@Mueheheh23 nvm its ((insert GS, IAS, TAS) * cos(PitchAngle)) * (conversion rate in the unit you are currently using). If you do not convert it it will show in m/s
@Mueheheh23 i believe it is ((insert GS, IAS or TAS, whichever you want) / cos(PitchAngle)) i might be wrong tho
Can i somehow detect horizontal speed (Flight data)
Is there a kind of random code? The kind that randomly create a value between two numbers.
Eyyy that could work on Flaks @NaRtA169
Can you make a value (like speed) delay between updates (I want to make a digital speedo for a car but I want the speed to delay between updates like a real car)
Is there a way to have a rotator only work if “ground” is the target?
can anyine here help me make a nightvision camera FULL BRIGHTNESS not just green lights
@WNP78 Do we have a code for incoming missile warning ?
Tôi ước gì đó cập nhật thêm tính năng ngôn ngữ và chơi online trực tuyến Hai người hoặc hơn
Can someone make an funky about bomb that can explode by itself at certain altitude?
@AAAA7 "selfDestructTimer" then set the amount of time you'd like the rocket to have before it explodes, I think it's counted in seconds. You can also set it to 0 if you want to make a rocket for a remote detonating bomb or something of that sort, just a neat little idea I thought would help
@WNP78 how can i change the lifetime of the rockets when activated?
@WNP78 may I request that you put in a way for things to activate when there's an incoming missile?
@Weirdoguymajig there's two ways really, if you just want a simple conversion just multiply the value by the conversion factor (ie
{Altitude * 3.28084}
would express altitude in feet. The label formatting also has a feature built in that hooks into the game's built in units system and formats units in the user's currently selected unit system. For that, there must be 3 sections in the {}, each separated by semicolons. The first is your expression, the second is the format specifier, which is just a string that controls how the number is formatted (how many decimal places, leading and trailing zeros, commas etc). PuttingN
there will give a fairly standard format but there is more info here. Then the 3rd section indicates what type of units to use. The options are:LongDistance
- takes input in m, shows mi/km/nmShortDistance
- takes m, shows ft/m - use this for altitudeTinyDistance
- takes m, shows mm/inchesSpeed
- takes m/s, shows mph/kmh/ktsMass
- takes kg, shows kg/lbsForce
- takes N, shows N/lbfVolume
- takes L, shows L/gal (US gallons)Area
- takes m^2, shows m^2/ft^2WingLoading
- takes kg/m^2, shows kg/m^2 or lbs/ft^2.For instance for altitude,
{Altitude;N0;ShortDistance}
would make an altitude readout.How can i change the altitude from meters to feet and ias from m/s to Mph on a label
ok but what is the input so I can have a rocket last a long time before blowing up?
@GorillaGuerrilla thanks for the suggestion man, I appreciate it
@hackk i used vtol nozzles as substitutes
Very Helpful! This should be a pinned Forum.
Apparently RCS can not use Funky Trees as I am making an auto stabilizer system
Can someone make an altitude indicator using Funky Trees? Am making it for my upcoming torpedo bomber.
The altitude is 20 feet (6 m).
@Hyper7439 ok thanks
@sharpclaw you cant
@GorillaGuerrilla what does that mean? im sorry but i didnt understand qnything that u said its too complex:)
@Darg12e it looks like u want to use something similar to clamp01 instead, your original code is a complete syntax error, u have to give pitch a condition, while pitch itself cant be a condition.
can someone fix this ft code?
Pitch ? 1:0
i need it to do minimum cause if u pitch down if does it fully not the exact inputbim giving it. idk how to fix it uts my first time trying codes.How do you convert rotor rpm to a prop RPM
What is the syntax for ternary operators, I couldn’t get it to work
@WNP78 will you make a code in Funky Trees that allows things to focus on incoming hostile missiles? I wanna make a working Radar Warning Receiver.
How to i add limited ammo in wing guns and miniguns using the ammo funky tree?
@SkyJayTheFirst exactly the most wanted answer for sp for many years.
Is there something responsible for pointing the missile at you?
How would I set something to target an incoming missile? I wanna be able to make a working Radar Warning Receiver.
@JackRaiden already fixed and its not colliding
@Darg12e maybe they're colliding and you don't use "true" on aircraftcollision I 5
think
How to make a tachometer on an airplane and on cars?
How Do I Make Door Guns Like The Ones In Gator 2
How do i make a light the blinks when the ammo is low or basically no ammo left...
@LobsterBisque128 i am wondering so I am able to make it a gear now but I cant make it stop in a vertical position and come back to a 95 degree angle
Thanks@LobsterBisque128
@WNP78 Do you think about a system that detects error with funky tree? I kinda messed up alot and had to write the code again.
Does anyone know how to make a piston look like shock?
@Darg12e@Darg12e
can someone fix this code?
its for my su 27 i need this to only go halfway on a rotator(its good) but the problem is its unstable for my su27 it does unnecessary adjustment when u pitch up it does not counter it it stays theyre before countering it i need it to counter it. its like a flyby wire idk
(Pitch) * (Activate1 ? 2 : 1) + clamp(PitchRate/100 ,-1,1) * (abs(AngleOfSlip) > 90 ? -1 : 1) + Roll
@WNP78 sorry to interrupt buy what does quote do?
@WNP78 thanks I was going to make a wing gun with limited ammo.
@Lake that's just the website formatting glitching. if you put " inside code block it shows as
"
. I changed the text to be bold so it doesn't do thatSomeone please explain the "
clamp(-1+smooth(Brake*3,1),0,1)
This will delay action by one second before Actuating, the same will happen with retraction. It’s scrappy but I hope it suits your purpose.
@SkyJayTheFirst do you mean a one second delay before it begins to move or takes one second to fully actuate?
@Darg12e I'm wondering the same thing, but nobody has answered my question.
is there a way to add a delay to an airbreak part?
like the input is Activate1 but it will have a 1 second delay
@WNP78 that is pretty cool
@WNP78 is there a formula I can use in an aircraft for mixture that essentially the lower it goes lowers the ma rpm, while still being at full throttle, like for example if the mixture was open (high) it would use 100% of the engines power, but if it was closed or lower, it would use less than 100%?
@WoodPlaneBuilder GeE, i WoUlDn'T hAvE gUeSsEd! I mean how would I do it with Overload.
I need help with the labels with funky tree
How would I set a delay to something when I activate it?
I want to make two working modes for the rotator: automatic and manual, how can I do it?
Use the input LandingGear
@HugoMunchkaroo
How can I make a hinge rotator activate when I press the gear symbol on mobile
@Louisianaboy2021024 that looks like an interesting command to me what r u trying to do with that lol?
@WNP78 oh
@Louisianaboy2021024 that looks like part of a dev console command, not an FT variable.
Where do I put the variable MissileLauncherLeft>MissileLauncherScript>set. enabled false at?
@Khanhlam okies
@GorillaGuerrilla Thanks.
Btw can you help me with this aircraft? I have some trouble limiting the menuvers whenever not needed
@Khanhlam clamp returns outputs with user specified range,
clamp01 is an equivalent of clamp with an output min of 0 and max 1
@WNP78 Does Clamp and Clamp01 any different?
@GorillaGuerrilla it workss!! thank you so much!
@GorillaGuerrilla sorry cause i dont know how to ft i only know the basics but ill try that
@Darg12e of cos it doesnt lol
first i dont see the logic of that
second even the parentheses are not properly paired
by multiplier + boolean
u could do something like that
(whatever function u wanted to control) * (Activate1 ? 2 : 1)
@GorillaGuerrilla i have this one
clamp01(1-Activate1)*75)
but it dont work:7
@Darg12e u might wanna try putting the Activate1 in a boolean multilplier, or clamp condition
is there a ft for a rotator to not go full until you activate a certain group?
like the max angle is 20* but only goes 10* and goes 20* when you activate a group for example group 1
@WNP78 i totally think any additional cockpit should have all variables listed in the flight data section as output. i am working on a cheapskate version of a decoy (with a winch and a "primary cockpit"), but i also need a regular cockpit that does all the original cockpit's jobs otherwise my plane is gonna flip and dash from the data provided by the decoy. if u know how cheap that sounds for a decoy. ;) so far theres only about 10 variables of flight data i can extract from the secondary
@Mrdumb9l191 most of the maths functions could be constructed from simpler functions, but that doesn't mean they're not useful. They allow people to write simpler, cleaner and probably faster expressions. Also, your expression will return NaN in the case x = 0, which is not desired behaviour for sign
You don’t need sign() because you could do x/abs(x)
@4 this is the code on my bay hinge
FireWeapons * (SelectedWeapon = "30mm Fused UHE Cannon" ? 0 : 1) * (SelectedWeapon = "TPD" ? 0 : 1)
so the bay door will open on all occasions except when u select the 30mm and the TPD
What input should I make when creating prop plane that has variable speed at certain altitude, or making the plane slower when it reaches at that specific altitude?
@4 make a name for your missile first, input this on your rotator= (SelectedWeapon = "(insert missile name here)") and there you go
So I have this sort of car that has a jet engine that turns on when you pitch (Press "W") for an extra boost, but the thing is that when I pitch in the opposite way(Press "S"), (use reverse on the car) the jet engine still turns on, not allowing me to use reverse on the car. So I'm just wondering whether I could only allow my jet engine to activate when I pitch forward (Press "W") only and not if I pitch backwards (Again, Press "S")
is there a variable for the situation of the landing gear?
@Quakinking1 ahh, so its is evolved with JAVASCRIPT?
@HowlingCooter how you can understand it?
@HowlingCooter como que ce conseguiu entender alguma coisa disso?
I have an idea for a cool weapons system. It would be cool to have an automatic targeting system for a cannon that will aim at the selected target
is there anyway to use TargetElevation for 2 flight computers
i want to have 2 variables that are TargetElevation for 2 different flight computers and their heights, is it possible?
Random thing, but the link to the PID controller information isn't defined. It just links back here, like the url wasn't pasted in.
tu160
So I’m working on a military airbus, I have all the fuselage done, but I want to make automated turrets. I have some experience with html, JavaScript, and syntax. I’m just looking for a variable to turn my turrets towards air-ground, and air-air, automatically, but I don’t want 100% accuracy. Thank you for your help sincerely Quak.
Never mind I figured it out I hadn’t considered that GS is in m/s instead of mph. Also do you @LobsterBisque128 know how to make a override system with the new levers in cockpit interior?
Oh okay Thank you. What does X correlate to? I changed X to -1 and that didn’t do anything.
You can use the equation
GS > Mach1 ? X : 0
You will need to change Mach1 for the actual speed and X for the amount of moment @Spaceboy3000
Hey I’m making a F-14 and I noticed the wings should fold back at Mach 1 automatically and I don’t know how to make a Funky tree for this could anyone help? Context Im using vtol for the folding back of the wings.
How would I set a delay to something when I activate it?
I need help with a missile bay that is going to open when you select the missile. Can someone help me?
Came here for variables, Learnt almost all ft codes ever. don't regret it.
@Ohmyus it is a shame they aren't consistent however as was said below I wouldn't want to change things and potentially break existing designs. To simplify working with them, the
deltaangle(a, b)
function will probably be useful to you.I know I am not a dev, but at this point it would be a mistake to change it, it would mess up a ton of code people have already written @Ohmyus
Hey, devs! It would be nice to have Heading and Target Heading measured the same way, either from 0 (north) to 360 or from -180 (south) to +180, but could you please make it so that they work the same way?
It's just going to simplify a tonne of FT codes, and it isn't really that hard to change, is it?
Funky sum(Throttle*20) / clamp(Throttle, 0.02, 1)
so i am making a fused bomb, but the bomb just gets destroyed if it hits the ground above a certain speed. It uses a detacher to arm and drop the bomb, but if i only want the bomb able to be dropped below a certain speed what would be the command and where do i put said command?
Is there anywhere to see an example of some code or project. I just want to write some variables and if then statements. Coming from Python and some C#.
You can use the floor operator, it won’t round it but it will get it pretty close to the number you want, you can do
floor(thing*100)/100
@Maroon
Anyone know if there's a way to round a number to a decimal place? I'm working with a label, but I'm using a ternary operator so it doesn't work right if I go (thing) ? (input/number;0.00) : (other value)
@LobsterBisque128 ok, thanks. That'll come in real handy.
You can link there inputs to 2 different variables, you then use the variables as outputs for the cockpit parts @SkyJayTheFirst
If my aircraft has 2 or more engines, is there a way I can bind the throttle controls inside the cockpit to an individual engine? You know, like seperate engine controls?
GS > x ? 1 : 0 would activate the detractor when your speed is greater than x @JustLookingForFriends
How exactly do I make a Detacher activate by Speed?
i have no idea what 90% of this means but i do know that i need to make something using this
Who the hell made all of this stuff, this is amazing!
@LobsterBisque128 I found it much thanks for the help :)
@Cy3berOdyssey to enable overload you go to the start page of simple planes and go into to thing under play that says mods. From there you just click overload and enable. When you do that there will be another icon near the bottom, you hover over the cannon, them you tap the new icon and it will open up a window that covers the whole screen, there will be a lot of general caricristics for parts that you can change if you want but for what you want it to there will be a small drop down near the top of the window, you select cannon, and change the flash scale to 0. (if you are completely confused by this I can post a cannon with 0 flash and give you the link)
@LobsterBisque128 thanks for the weclome. So how does one get that on android? I just get a blank window asking me to add stuff to it?
Ho
Actually I think there is, I do not have access to the game right now but I think there is a Overload thing on the cannon called flash scale, if you put it to 0 it should get rid of the flash, by the way it is always good to have new members of this community @Cy3berOdyssey
Building my first tureted aircraft and I was wondering if there was a way to use this to remove the cannon barell "flash" when it fires?
@LobsterBisque128 Thanks.. I found a more part efficient way though.. I used a wing gun instead of cannon, and used the fireGuns code., building a tank rn, and working on the machine gun and needed the belt on it to wobble when firing
You could use something like this
Sum(abs(rate(ammo(WeaponName))) != 0
It would return 1 once the weapon is fired
@L3thalPredator
So I want a piston to start cycling when I fire a cannon, but I have a custom name for the cannon, anyone know what I could put?
@SkyJayTheFirst yeah...
or we're just rly active
@IceCraftGaming small website, eh?
I know its not a force, Shut up
I will always remember that lmao
@BittyJupiter360 first off, no spaces with Activate2 when you put that in the input. Also, set minimum input to whatever number you need (ie 0, or -1), and your max output higher. If you need to invert it, then do so.
@SkyJayTheFirst Ok, so when Activate 2 is deactivated the hinges stay in their open position, how do I make the hinge revert back to its starting position when I turn off Activate 2?
me who was almost solving the problem myself by using XML to change the canards inputs to RollRate (or something like that,i don't know,my iq expanded so much i ended up in the hospital) @SkyJayTheFirst
@FlyingSheeper I'm not sure how to work with canards, but I would recommend you go to GuyFolk and watch some of his videos on making supermaneuverable fighters. He actually goes over how to properly tune canards.
hey y'all, it's me again,and something kinda funny is how I'm making a eletronically controlled canard which tries to stabilize itself,of course,i'm not that stupid,so it's working,but it always resets back to zero when it tries to stabilize the craft,anywho knows why this is the case?and even,how should i deal with it?
No problem! i may actually post the prototype of the COFFIN plane too,that is,if doesn't stink too hard being a prototype. @LobsterBisque128
I will get the equation written up probably by tomorrow because I don’t have access to the game right now @FlyingSheeper
which could come in handy considering i'm horribly allergic to helicopters and equations,so,well @LobsterBisque128
A syntax error means you have written something that the computer doesn’t know what to do with, it is usually a typo in the code, you can fix it my going through and checking for any typos you may have @CatMasterLuke
Your welcome, if you don’t know how to do it I can write out a equation @FlyingSheeper
I sometimes get a message in the variables screen saying “syntax error” what does this mean and how can I fix it?
@LobsterBisque128 oh neat!thanks mister sea lobster!
I am not exactly sure what heading corilates to north and whatnot but you could use a series of if statements like checking if the heading north and if not you check if it is west and continue entil you have covered all of the possibilities @FlyingSheeper
Currently i'm trying to make a fully non-mechanical improvised "COFFIN" cockpit (in short, basically ball of glass that have lots of numbers and letters that stay inside plane),and i'm trying to make a fancy advanced heading counter,that instead of giving out numbers,would simply give a "North/south" ect output,i am just too ambitious,dumb or both?
@BittyJupiter360 With the hinge rotator set to the range you want (example: 90°), on overload mod, set your minimum output to 0, and keep maximum output as 1, or -1, depending on which direction you want it to go. For input, type in Activate2.
I want to make a hinger rotator move to its maximum degree of travel when I activate group 2, and move back to its original position when I deactivate group 2. How would I do this. I am not too familiar with Funky trees.
@linxiaofeng2339 @huiyuanzhang
Air pressure in SP is
exp(-Altitude/7640)
orpow(IAS/TAS,2)
. IIRC these two is equivalent (i.e. difference is less than 1e-6), but you should check it.@huiyuanzhang it doesn't quite apply. SP's atmosphere was already long built when I made the IAS readout and I didn't want to change it and affect the way people's aircraft fly. I decided to make IAS match how the aircraft would be flying, rather than what IAS would be at that altitude in real life. This also means it doesn't include calculation for compressibility effects etc. I also never added a Mach readout because the concept of Mach simply doesn't exist in SP's aerodynamics, so the number is only really of value for aesthetics or realism. You could probably just assume vague standard temperature of 15C surface and the 2 degrees per thousand feet rule (or 3.5C per km) for lapse rate. The formula used for the mach readout in the stock Wasp jet is
TAS/(340-clamp((Altitude*0.003937),0,43))
which was made by someone else@linxiaofeng2339 is IAS divided by TAS really the pressure ratio?
Bernoulli's equation suggests a difference of 1/2rhov^2 between pitot and static pressure, however rho and pressure are not completely linked (as temperature is different at different altitudes).
Even if the temperature was constant, then it should be p(current)/p(sea level) = (IAS/TAS) squared, not just (IAS/TAS).
I don't think we have verified whether the ISA (International Standard Atmosphere) model applies to SimplePlanes, which would allow us to deduce the pressure and temperature at different altitudes.
(I was trying to calculate Mach Number, and as we know the speed of sound changes with air temperature, so I ran into a similar problem)
@WNP78 thanks!
@SkyJayTheFirst Activate1 & Activate2
@WNP78 what funky tree layout would I need to make something activate, but only if both AG1 and AG2 are activated?
@PPLLAANNEE SelectedWeaponName = "weapon1"
would
SelectedWeaponName==weapon1
be a valid input?i want it to output a 1 when i select the weapon named
weapon1
is it possible to do this?
I know that IAS divided by TAS can get the air pressure, but I want to calculate the air pressure according to the altitude.
@LobsterBisque128
If you wanted to display the selected weapon and the ammo you would need to have the weapon name and the ammo in 2 different bracket thingys
{SelectedWeaponName}: {ammo(SelectedWeaponName)}@ZilithyneYT
can I use a {SelectedWeaponName} within an {ammo(x)} ? For example on a label where I want to display the selected weapon name and the ammo count (e.g Inferno 4 on a screen) could I use {SelectedWeaponName} {ammo(SelectedWeaponName)}
Also, does the {ammo(x)} apply to missiles or just guns and cannons?
You may be able to compare IAS and TAS to get air pressure @linxiaofeng2339
@LobsterBisque128 Thanks, I'll have to try it in my next plane!
You add curly brackets around it like this {TargetDistance+Altitude}@ZilithyneYT
How do I make a label display flight information, such as TargetDistance and TargetSelected ?
@WNP78 How do you calculate the air pressure in the game?
@LobsterBisque128 thx
Yes it would output a 1 if the statement is true and -1 if the statement is false, though I normally use a space in between the things @PPLLAANNEE
i am slightly confused on how > and < work
if I put in
PitchAngle>5
does it give a 1 if pitch angle is over 5? and a -1 if pitch angle is under 5?
if not what does it do
It would if you increased the health of the entire aircraft rather than just the outside layer, but you would probably go flying if a missle did hit you@ANOMC0
@PDX01 but increasing the health doesn't protect you from missiles or other exploding stuff, only from the guns(not including the cannon, only the minigun, wing gun etc, )
You could increase the health of your aircraft with XLM @PDX01
Format and examples pls
Any ideas or link that can inspire me to get armor from rockets or projectiles?
@LobsterBisque128 thx
Then the equation would be
GForce > 2 ? (TAS > 500 ? 1 : 0) : 0
Keep in mind that you will probably need to adjust the 500 mph into whatever TAS measures in @Ummmhelli
@LobsterBisque128 go over 500mph TAS while manouvering that gives atleast 2gs or however many is it for a wasp pulling the stick full back
This would turn the engine all the way on when throttle is over 90%
Throttle > 0.9
This would put input X instead in case you wanted it not to be All the way on or use a variable
Throttle > 0.9 ? X : 0
@sharpclaw
can I make an input that says an engine activates (x) at 90% throttle or greater, like throttle>90=x ?
What do you want it to go 500 over, this is a basic equation
PitchRate > number ? (Trait > 500 ? 1 : alternativeInput1) : alternativeInput2
In this if the pitch rate goes over a spicific point (number) it will check if whatever it is that you want is over 500 (trait) if so it will output 1. Else it will output alternateInput1 ( you need to choose it) if the pitch rate is not over number it will output alternateInput2. Keep in mind you need to supply values for number, trait, alternateInput1 and alternateInput2 @Ummmhelli
Question. I am making an aircraft that goes supersonic. I wanted it so if it pitches up fast enough if going over 500 it sends a signal of 1 output to the engine. Take the time you have 2 months to reply
What is modulo? Is it this % usually. @GeminiTitan
No modulo function?
How come this is not working as the input for an vtol port
how can i make a realistic landing gear (the LG i want to use here is a f-86 sabre) cus im lazy
Well that great that it worked, I was not completely sure it would because I originally used the equation for an auto turret @AgentFox123
You could use the equation
(((TargetHeading - Heading) + (rate(TargetHeading) * (TargetDistance / 1500)))+ (TargetElevation + (rate(TargetElevation) * (TargetDistance / 1500)))) < 5 ? 1 : 0
This should work in theory but it is untested so put to much hope in it, but if it dose work it will set the light off if you get within 5 degrees of the target and the 1500 is the bullet speed so you can change that if you need to @AgentFox123
Just to confirm, do you want to know how to make a light go off when you are correctly aimed at a target @AgentFox123
You could use the input
-Activate8
This would activate the engines when it is deactivated @Rocky5050
Is there a way I can use deactivation groups as inputs? like for example ac8 is my engines and when i turn off ac8 I want it to turn off my engines as it normally does but i also want it to activate another engine that i am using for reverse.
@Yoloooooo yes
@LobsterBisque128 Thanks It worked verry well!
You could set it to
floor(Time) @Goshka
anny one know of a way to set the input gauge so it will constistantly tick like a clock?
@NangongMaimai thank you so much it worked
@PPLLAANNEE well... maybe multiply your speed by sin(AngleOfSlip)
is there a way to know the sideways speed of a flight computer?
@NangongMaimai don't know either
@KipSqueaks you could use this
Pitch*(LandingGear+X)
X being the intensity that you want it to increase by, Must be a positive number
How can i make a hinge rotor be able to rotate to a higher degree when landing gear is down/activated, using pitch as the main control and landing gear as the “booster” or enable the ability to rotate the rotor more
any idea what's ; used for?
Ok thanks @WNP78
Is there any way to change weapon with funk?
@LobsterBisque128 & (and) is only true when both conditions are met, | (or) is true when either condition is met.
Dose and only include the overlap between the conditions or dose it output true when either condition is met
@NangongMaimai There's also Continuous
by the way, how many interaction types does a button have? I only know toggle and once
is there any way to know if I'm locked by enemy?
Orbit camera?
You can use a the funky trees look pitch, look yaw, and look roll from a camera or orbit cam to see what way you are looking but only if you are using the camera @Shootlegger
I am wanting to make a tank, so anywhere you look, the turret will follow. What funky tree should I use in order to do this?
@LobsterBisque128 for a complicated math problem lol
Well, even if my way did not work I’m glad you figured it out @PPLLAANNEE
@LobsterBisque128 it didnt work but i figured out another way to do it
Is there a way to set up a speed governor using this for the car engine?
I am not sure when anyone would use e period, I know it is the natural root or something but I am not sure what you can use it for @NangongMaimai
I can't imagine what geek will use e in his funk
To get the heading from one part to another using something like this
atan((Latitude1-Latitude2)/(longitude1-Longitude2))
This will give you the angle of the line intersecting both points but you may need to switch latitude and longitude @PPLLAANNEE
@LobsterBisque128 i dont know a bit of trigonometry lol help me
You can get latitude, longitude, and altitude for both the main and non main cockpits and from there you just need to do a bit of trigonometry to find out what one is in front of the other @PPLLAANNEE
is there ANY way to know if one flight computer is behind another flight computer with the variables.
or something like TargetHeading but for your own parts?
@LobsterBisque128 everything is converted into degrees for you for funky trees.
Is sin cos and tan in degrees or radins
Thanks for this. I have some experience in C++ so it shouln't be too hard to get around
Is there any way to do things like automatically activate active groups or the gear or selecting weapons?
Well what do you want to make, I’m not an expert but I would like to think I am better at it than most @Nightmaster
So I had an idea but I don't have the slightest clue about what to do or where to start with coding in game with tools provided( i.e these funky trees, variables, and Overload) however I would really like to be able to do so. If I could request some pointers or links that could be helpful to me that would be much appreciated.
@HyperSonicPlane never mind! i figured it out
I’m confused does this work on text? because on the upgraded “wasp” plane, there is a text panel that displays the current altitude and i cannot find a variable that was created for this. can you explain please?
Thx this helps a lot :D
@LotusCarsSub oh, I'm not really knowledgeable on funky trees, still learning
I learned this today yes TODAY and I have no idea what im eveen doing
Lmao imagine if they made it so you could execute C# code in the next update
Anyone know any ways to do alternate inputs for weapons or guns
@Atrocitum Thanks for the answer, but that's the problem. I am already familiar with these functions and I am not bad at direct and not complex control commands, but I do not know where to find complex codes and how to use the new menu (not from mods, but added with an update)
@L3thalPredator ur not, it's
FireGuns
for miniguns/wing guns andFireWeapon
for all sorts of bombs/missile/cannonsI STILL HAVE NO CLUE HOW TO SET UP FUNKY TREES TO MY BUILDS T_T
@LobsterBisque128 oh, I don't think that's possible
Yes those are the default inputs but what if you wanted the guns to fire whenever you hit activator 1 or reached a speed of 300 mph @L3thalPredator
@LobsterBisque128 if I'm correct a minigun/wing gun is FireWeapons , and a cannon is FireCannons
How do you control when guns and weapons fire with funky trees
@ELGATOGAMEPLAYS
RollRate The rate at which the aircraft rolls (deg/s) (-inf~inf)
https://snowflake0s.github.io/funkyguide/
Use this. It's an updated and complete guide
How i know the turn rate of my plane?
Can you guys tell me the input funky for making a rotator for Bomber aircraft's bay?
ya know... if you read this enough times you will eventually understand it..
most of it
How do you make it work as a rpm indicator? Yall made this so confusing
Ok that was helpful @WNP78
@24terrycast there are some outputs from cockpit parts (even non main ones), accessible with the variable outputs button which is in the rotation sub-menu
Can you take measurements at different locations other than your cockpit
My head
@Nagmeister Im also wondering about dis
Puedes configurar que un avión se acerque y conecte con el avión cisterna automáticamente?
Is it possible to read the current RPM of a regular propeller engine with this?
@Awalters38 same
@KyaRL People who make LUA scripts ("recipes" in the game) for the science game Fold.it use this to calculate a "Random" number ("seed").
.
Granted, it doesn't translate over to SP, it seems easily able to be SOMEWHAT replicated from what I see available (and I suck at FT and "recipe" coding!).
seed=os.time()
seed=1/seed
while seed<10000000 do seed=seed*10 end
seed=seed-seed%1
math.randomseed(seed)
math.random(100)
.
Perhaps something that does like...
pingpong(Latitude, Longitude) * Time / log(Altitude, Fuel)
Again, I am not a coder, or good at math, so I don't know if that will resolve into a number -- or how to even get the number, for that matter -- but it feels like it should be able to produce a fairly random as hell number... provided you aren't immediately checking for it at the time whatever you built spawns in.
.
Though, while I feel the key there is using
pingpong
, I get the impression that usingLongitude
and/orLatitude
might not work directly, without some further nested math, to ensure it is always a positive value. Just seems likepingpong
will always be a fairly random result on its own, and then when factored with everything else, ensures that you end up with a random value. But again, getting that equation to not error AND THEN getting the value it spits out, is where you're on your own... :}What do you do when you need to store a value, say the aircraft’s heading when the level begins
so i need help what variable i have to use to make the engines start slower but still have the same speed?
@KyaRL there's no built in random number generator, you'll have to find a way to get random values from the environment or the craft, probably by taking some very precise measurement.
I feel like I'm missing something, but is there any way to generate a random number?
for example, if you put something like "random(a,b)" then it would generate a random number between the values of a and b. for example, random(1,10), would output a random number between 1 and 10. Perhaps also a way to be able to set a certain amount of decimal points for the random number to be generated as well, so say with the same input of random(1,10), you could get 5.555, 5.5, or 5 depending on the number of decimal points you choose to round to.
Is there a way to do this already? because I feel like I've missed something reading through this that could provide a way to do so...
@elia The pigpen has a built-in fly-by-wire system that uses the new variables system to keep the plane stable. The acro switch just makes the plane less stable and able to do more acrobatics.
The official plane wasp has an acro function on it, it's something or a function that can i activate with funkytree or even by adding some hardware to every plane?
Hmm that would go pretty well with the smooth function. Now if only I can figure out how to make it work in increments @Dima0012m
@poenix if you want the flaps to be used per button, here's the code:max(Activate2,0). if you want the flaps to be adjusted, add sliders there VTOL or roll etc.
@poenix if you want the flaps to be used per button, here's the code:max(Activate2,0). if you want the flaps to be adjusted, add sliders there VTOL or roll etc.
完了,这下真的跟简单没关系了。
Any ideas how I can set flaps to a button and have them cycle through the settings? I’m replicating a German design and the flaps are on push buttons that cycle between the different flap settings.
+0.10 VTOL maybe?
@Dima0012m Care to elaborate?
@SirButter Well, at least there is something ... I make mechanisms even with such capabilities, and they are experimental.
@SirButter Well, at least there is something ... I make mechanisms even with such capabilities, and they are experimental.
Hey all, I'm trying to get some inputs from some cockpit buttons and I was wondering how to get them to activate custom variables (trying to build a simple autopilot, buttons used to select altitude and heading). I can set a button to something like FireGuns and that works fine, but I don't want to use an existing variable (because they need to be available for their regular uses). Is it possible to do this? If not then that's a shame, that's really limiting on what inputs one can have with funky trees. Any advice appreciated!
@RYAviation yes, Its possible, Very Possible. Put * Activate [number] here like Throttle * Activate1
Hello guys i need some help, so i can put input on overload? Then things work magically?, i mean I'm not good any any fields about science and math but i wnat to learn this kind of things, if any one know someone who make or post a list of examples for beginners to do overloads can you please mention them, that will be very helpful
So like I’m trying to get a two engine to turn on only if activation 1&2 , 1&3 are on is that even possible with funky
Errr... could you please update the codes for the 1.11 update? Like, the missile lock codes or something like that?
@AlexRu да легко ими пользоваться. Для начала установи моды Overload и Fine tuner (есть в меню во вкладке mods). У тебя в редакторе появится кнопка, на которой изображен самолет, а над ним знак </>. При выборе любой детали самолета и нажатии на кнопку ты сможешь редактировать параметры этой детали и добавлять новые (например, масштаб, хп, влияние сопротивления воздуха, сила тяги для двигателей, время наведения, маневренность и угол захвата цели для самонаводящихся ракет и т.д.). Теперь переходим, собственно, к функциям. Разберем на примере ротатора. Открываешь меню overload, выбрав ротатор, заходишь во вкладку Input Controller и видишь параметр Input. Это условие для работы ротатора. Например,если Input = Pitch,то ротатор будет работать при команде с джойстика на отклонение руля высоты. Функции позволяют задать кастомное условие. Например, если условие на ротаторе GearDown, то он сработает, когда шасси будут полностью убраны. Это можно использовать, например, для создания кастомных створок шасси. А еще с помощью различных функций и их комбинаций можно заставить снаряд пушки взрываться рядом с целью. Или сделать автопилот, который наводить нос самолета на цель. Или потсроить турель с автонаведением. В общем, потннциал фактически огромен. Понятно, что сложные вещи требуют сложных функций, но сделать, допустим, отсеки с самонаводящимися ракетами , открывающиеся только если ракеты захватили цель, или кастомные шасси со створками не составит никакого труда, зато будет офигенно выглядеть и поможет набрать апвоутов.
Are you able to use something like this random<5
Класс, так и не понял как пользоваться, но выглядит круто. Правда есть один вопрос— а с хрена ли записе два года? :/
@WNP78 oh! That’s interesting to know!
@poenix you could rename your cannons, too
A new rpm function dedicated to jets would also be nice to have for cockpit building.
How hard would it be if implement the ability differentiate ammo on different cannons. This is mostly so I could make a fancy ammo counter in the new update
Maybe it could be something like CannonAmmo1
CannonAmmo2 or something like that. It could probably go up to six.
@WNP78 thanks alot! Didnt really notice that. That makes things alot easier. :)
@Justarandomuser2009 just use the very top toggle button in the gauge options, it will cycle through presets that will set it up for you.
Cuz when i do IAS for funky when i speed up it just goes like sonic, i also try to play with the multiplier it doesnt match the speed help pls
Im dumb how do you do the speed gauge properly?? (And if you can, please simplify it)
Thank you
I love how 1.11 redirects you
@jacephysicsboss @EverettStormy
.
Check this...
How does quantum physics apply here????
@jacephysicsboss quantum physics. also i would join this discord for help
yeet
help, I want a thing that activates after a certain amount of the same input, so like a missile that fires after I click fire 4 times. can anybody figure this out because I cant. been sitting here with a stupid face for 5 hours.
can anybody tell me how to program the strobe light to when i fire the tank gun to turn off and to turn on wen the gun is ready to fire again
@Liito at last!.. THANK YOU very much I will give you
credit
for the code on the craft description during submission...this is awesome ..It worked perfectly..code worked even if i edited it to activate in 3 secs.@An2k try this.
floor(smooth(Brake*1.15 ,1))
if it's too fast, you can reduce the number after the comma.
@ZeroWithSlashedO try this..... As if it's on your dash
TargetSelected & TargetDistance<1828 & (TargetElevation-PitchAngle)<30 & (TargetElevation-PitchAngle)>-30 & (TargetHeading - ((sign(Heading)<0)?(360+Heading):Heading))<30 & (TargetHeading - ((sign(Heading)<0)?(360+Heading):Heading))>-30
@LieutenantSOT
@ZeroWithSlashedO
The closest thing you can get in SP is
SelectedTarget
.Not exactly a missile lock, but you can make stuff work when you select a target.
this Request STATUS:(EDIT)
answered
/solution found
Provided by Liito---> floor(smooth(Brake*1.15 ,1))
Guys can you help me..need a FT code to
only activate when BRAKE button is held/hold for >= 1.5 seconds
. Im building something with a 2 part brake that onepart activate on Brake on >= 0.1 & <= 0.98 brake power and another whenbrake held on 1.5 secs so i wont hit it accidentaly.I Tried on debugger something like Brake >= 0.99 to detect brake is held but i dont no what to put on if brake button is held 1.5 seconds part..idk I tried using something like sum(Brake) ..cant make it workNot possible as of rn. @SimpleUser1938
Oh ok. Thanks for the info though, @LieutenantSOT. I know how to get it working when I fire a missile, but it's just underwhelming.
@ZeroWithSlashedO it is plausible, but I forgot the exact input
.
I know how to get it to work if you fire a missile, but not how to if it locks. Sorry m8
I'm trying to make a beacon light that turns on when you lock something, can anybody tell me how? Or is it not available currently?
I’m dumb and dunno how to get into funky trees
Uh
Very useful
uhhh wow. m a t h s . . .
m a t h s . . .
@Huax 我动不动就做真实的汽车,到时候发出来让大家玩玩,不过会卡,太多零件了,光一个驾驶室给我整了5000多个,我就是不知道咋做自定义轮毂(可以跟轮胎动的那种)现在有的代码不行,太容易飞天了
@Guangle
自制车轮的话,带个无碰撞空心圆筒做内外圆。但是中间的装饰要去找外观大神,我外观是渣。最后直接改链接到转轴上,并且位置改好就完事了。
系统车轮。。。直接做个无碰撞装饰让他转速略高于真车轮就完了。
how do i change the weapon's input?
@Huax 那么咋做自定义轮毂呢?能跟车轮动和停的
@Huax 知道啦,已经做出来了😂
@Guangle 用
sum(你的控制键)*速度倍数
我在想如何才能制作出一个可以想转动想停止或反转的传动轴,可是我不太理解这些xml的含义,对此我很无奈
@Jachal68 Since your wing turned 90 degree to become your sail, maybe you should try AoA instead of AoS
@WNP78 I really love this control system but on a recent project for a sailboat, I've been having trouble calculating the ground-relative wind angle/wind speed using the flight data. I know that it's avaliable in the wind menu, but that data is not avaliable in the flight data. I tried calculating it using some basic trig and it only works on the condition that the boat is tracking perfectly straight in the water (not sliding sideways at all). This becomes a problem when doing maneuvers and such where the boat slides sideways. The current calculation I have is: atan(sin(AngleOfSlip)IAS/(cos(AngleOfSlip)TAS-GS))
This should output the angle of the objective wind relative to the bow, but it only works when the boat is tracking straight.
I hope all that made sense.
How can I make a list of element such that when the result is part of the list, the output is x and otherwise output is y?
@AtlasSP clamp01(tan(sum(desiredInput))) may work
In the 1st period, tanx<0 thus 0
In the 2nd, tanx>1 thus 1 and rest a bit
Is there any chance I could check an object's health by its id? I'm working on a damage indicator and I have realized that it might not be possible.
is there any way to let the piston go half a turn then rest a bit and then continue working (open stop then close stop and repeat)?
How do you make a input that turns on a pitch rate when you don’t use pitch
Is there a Value for if a lock is detected on your aircraft, if so is there one for if you have a enemy aircraft locked up?
@L0RR3B0RR3 It can be changed to ((Altitude * 3.28084) > 55000? 1:0).
hmm, can someone write a code where the plane will always try to make the pitchrate as 0
@11qazxc Yeah, I got it working now. VTOL engine and nozzle made it look like an A-10 gun's smoke trail, so I used a stretched beacon light with custom blink program instead. Thanks for the reply.
@ShinyGemsBro
I knew that humans can be stupid, but comments under this post is breaking records.
It's, like, basic statements that kids know from at least 5 year of life
Variable>=Constant
Variable is any input, constant is any number.In your case you will need VerticalG, because you need vapor on horizontal surface.
About speed, i don't think you can calculate temperature and pressure of vapor at specific conditions, so IAS will be okay.
To join two comparsions you can use boolean mult (a&b) (boolean and real mult isn't same thing)
I'm planning to make that vapor effect cloud that happens when a plane does a turn at high speed and Gs. How do I code the VTOL engine and nozzle into firing when a certain G or speed is reached?
@Mikey101234 using this as input of something means that if condition is true then first part of expression(between
?
and:
is used); otherwise, expression after:
is used. In general this is the same asif(condition) {code if condition=true} else {code if condition=false}
Remember, all units are in meters for altitude or distance and speed is measured in meters per second@BurkeAircraft1
How do I use the value if true and value if false code?
@BurkeAircraft1 Here you go: Altitude>16764
What would be a input that activates a airbrake at 55000 feet not gradually just when it hits 55000 feet
@PvtJok3r oh, nice
@L0RR3B0RR3 thought you might but if someone else stumbles upon this thread looking for the same answer at least it’s there lol.
@PvtJok3r thanks for the replie but i have a hang of it now
@L0RR3B0RR3 on the rotator for the wheel type - ceil(smooth(clamp01(LandingGear),0.75))
On the rotator for the door type - floor(smooth(clamp01(LandingGear),0.75))
Thank you very much
hey, i need some code that tells a rotator where a target is relative to the aircraft. for an example on a radar, a rotator would point towards where the target is.
Noice
So, recently I just caught word of Funky Trees, I'm having a hard time learning how to use it and how to begin writing scripts that I can use on my aircraft. For instance, a lot of aircraft have a special way of retracting their landing gear, in which the tire first gets retracted and then comes the cover. Plz, help?
After I built the Falcon's code i realized there's a better way to write stuff lmao
@BurkeAircraft1 smooth((GForce>30),1+clamp01(GForce<=30)*99)=1
This will trigger when G has been over 30 for 2 seconds
@ProjectVideoGame GS * cos(AngleOfSlip) * abs(cos(AngleOfAttack)) should do that
@AeroForta I recommend this work powered by @JoshuaW
Help, im making auto targeting turret. It uses two rotators, 1 horizontal rotator with uses TargetSelected and TargetHeading(i think) then 1 vertical rotator with uses TargetSelected and Target Elevation. The Problem is i don't know how to apply this in both rotators input, so i really appreciate it if you help me.
@WNP78 then I fixed problem like this:The real "Sign(x)" is:
(sign(x)-clamp01(x=0)) .
XD
@WNP78 I still feel confused about function: sign(x), when the "x" is "zero", the output of sign(x) still is "1", not "0".
I need help can someone make funky tree code that makes a detacher detach when a g limit is broken for a couple seconds
@OPaiTaOn there you go
TargetSelected ? TargetDistance / (1250 -
rate(TargetDistance)) : 60
Hi! Faced the problem of high frequency noise in the control system at low speeds (about 0-20 kmh). I should make a low pass filter, but I have no idea how to make it. Or is it possible to solve the problem differently? This noise does not really interfere, but rather just annoys with constant twitching of surfaces. Thank you!
@linxiaofeng2339
not what I am looking for,
I want it to be specific (negative and positive vectors), but all speed data can't go in the negatives, only calculates the speed, not vector
(Z+ is forward, Z- is Backward)
I was planning to use latitude and longitude and heading the get precise Z vectors for all directions
@ProjectVideoGame Input:
x*(IAS(or TAS or GS)>----?1:0)
@nicolascolissi14 Input:
(Throttle/0.9)*(Throttle<0.9?1:0)
@Junkers87 No .
@Dimassas9988 так это и есть страница с документацией. если хочешь понять, что написано, то учи английский
Помогите дайте команды синтаксис и слова для программирования деталей моего самолета
I don’t know how to but you can change the lifespan of said projectile, the time is in seconds, the way I find out the “lifetime” (range) of a weapon is by looking up how fast said ammo is, set that to the weapon(don’t forget to convert measurements),divide the answer by the range of the irl weapon, and then divide it by 60(or something like that) to get the realistic range of a weapon, I did it and I got a lifespan of 17.6904755 seconds at a velocity of 840 m/s@OPaiTaOn
I'm not sure if this is still open to suggestions, but it says so in the post so here goes: what about a "sensor" part that can collect additional flight data similar to a cockpit block, and have an ID of some sort, then a function to retrieve the data, something like: flightdata(x, y) where x is the flight data you want from the sensor with ID of y. This could open up a variety of new things not possible before, and even create the ability to make user-defined variables.
how can i make a cannon projectile detonate by proximity? I want to make a flak 88
@Urocyon (Time = (Wanted time in seconds)) would probably do it.
Dunno about the actual time of day though
Is there a way to make lights activate due to time of day?
is there any way to make countermeasure dispensers fire on the fireGuns input?
if not is there any way to put the guns on the launchCountermeasures input?
Honestly after playing around quite a bit with your "Funky trees" xml scripting language, i find that it adds a lot to the game. It's possible to create things that are much more advanced than ye old days of putting throttle as a rotor's input.
As FT stands now it's a really useful tool to calculate trajectories or for very simple condition logic. But i think the one thing it lacks is a reliable way to store information. I have been able to overcome this limit by using canons and other weapons as input and memory devices (by reading their ammo count).
It would be incredible if you could add a method to store a numerical value somewhere. Either that or some way to use the fire command and select a weapon from FT (that would enable the code to lower values by itself, by shooting multiple times).
That or some kind of sound block would be an amazing add to this game.
Anyways thanks for reading and for giving us FT :)
As I know Pi Is Equivalent To 3.14159265359 Or simply 3.14.
How do I get the Z(Front and Back) Vector? I wanna make my flying rover very stable during flight, my rover has an x(Anti side Slip) and y(Altitude Hold) vector stabilizers, but I don't have z
@onyx63 sadly that's not a thing at the moment. But if you want to model the spooling of an engine you could try using the
smooth(Throttle,
function with a time that is an estimate for how long the engine takes to spool. Another approach could be to measure the rate of fuel depletion:rate(-Fuel)
however this doesn't seem to provide a very precise result since the fuel depletes in very small steps.Is it possible to get information from a component of the plane? Like in the input of an engine i have a specific smoothing function, and a light that reflect the state of the engine (warmup, on, off).
Something along the lines of :
(partID.Input) as the value of the function that's inside the input of the part, here a smoothing function.
with the value of the input of this part?
WNP78 incredible, a quick response from the dev himself :)
Thanks for directing me to this doc, it'll come in handy.
@onyx63 it's a language I made from scratch. It doesn't really support code like a scripting language, only "single-line" expressions. There is a nice community made guide here if this post isn't enough.
sorry to bother you guys, i'm trying to automate parts of my craft and i was wondering if there was a more complete documentation about scripting in SP?
Like, how i can setup logic in my input (if that do this)...?
Edit: what scripting langage is this? Is it something that exists outside of SP or did you make it yourselves? Looks like AS3 but i wanna be sure
when i lock on to a target the rotators move to target, but i switch target it goes the away from it. And I realized that the way the cockpit is facing affect where the rotators target. how do I fix this.
So, is there a way to make countermeasures fire as soon as anything gets a lock on you?
@Grey1 https://www.simpleplanes.com/Mods/View/524146/Overload
@Delightedman oh? How so?
my brain AAAAA
Well I have a question, how do I even access it and is it doable in mobile
Could there please be added a function which can directly tell you a previous value? Something like: time(x, y) which displays the value of "x" y seconds ago? Or if there is already a way to do this someone please tell me.
It's BIG BRAIN time!!! ☝️🧠👆 ==> 🤯
@JED im also new to this stuff but i think you can work with what you have on this page, because thats basically just math. You can probably start by writing things from this list in various combinations and seeing what works and what doesent. Also, what i do is i download a walker or something like that and then i dissect it.
Is it planned to add the InputController to guns? @WNP78
Clearly I am late to this game
It's almost equivalent to programming, except when I can't add variables.
Is there a way to get the current value of the input?
i still less understand how Funky Trees work, I tried to make the rotator rotate continuously but don't know how to make it spin faster, any suggestion... .?
My name is jennie, is there anyone out there who teach me funky trees
I am 100% new to this funky trees business but want to learn how to do it, how can I start off? Is there like a program that teaches You how to use this stuff and maybe a cheat sheet or link to how I can start learning?
this are all xml command?
Geforce(doge)
okay nice
@AlienbeefyTheCheekiBreeki op i'm dumb
@bjac0 that already exists
ammo("Cannon")
we def need an ammo output, something along the lines of selected weapon, so like if your cannon has an ammo count of 100 then
(ammoOf = Cannon) = 100
it could open up possibilities for ammo counters & firing sequences by using something likerate(ammoOf = Cannon)
and then modifying the downlinehow do you guys understand this stuff?
Im sorta noob I can mod but I need mods for mobile idk what the red means :(
how do i make an AoA limiter?
@Junkers87
No problem
@switdog08 Ok thank you for the reply
@Junkers87
Its automatically in the game. You need the Overload mod to use it though.
Since your on Android, Overload is automatically in the game too.
how do i install funky trees
How do I make something increase to full power with speed and below a certain altitude
Can some please make this easier to understand
Hi, I would appreciate it if you could read this forum and follow the instructions.
Thanks!
@WNP78 let me guess, delay lines?
Ight actually that's fine. I just look more forward to it lol.@WNP78
I hope i can use these things properly but im too dumb
@Hedero secret, but cool :P
Oh ok, no problemo dude. I was wondering why the airbrakes wasn't working. Could you maybe give a little info on what the next update will include?@WNP78
@Hedero I remember now there's a bug with using
rate(IAS)
, which I've already got fixed for the next update but for now, I'd suggest just lowering the power of the engine to decrease the acceleration, and then lowering the drag on the aircraft to bring the top speed back up to where it was.Ok, so I used your exact line of code for the engines and I messed around with the numbers. I changed the 10s to 100s and to 5s and I didn't notice an deviation in the speed or acceleration. So, what would they be for then?@WNP78
@Hedero well the normal way I'd do this isn't by FT, it's by removing and reducing drag on most of the aircraft, and then decreasing the power of the engines to keep the top speed down. If that isn't enough, I suppose you could try something along the lines of using
Throttle * 10 / clamp01(rate(IAS) + 10)
. But given the spool up times of prop engines, I wouldn't be surprised if this causes an oscillation. You could also try using a hidden airbrake part with it's input set to some function ofrate(IAS)
(make sure you don't put negatives in there though).I'm not good at all with ft so I'm just curious if you would know a simple code that would allow my aircraft to have a realistic, slow acceleration yet have a decent top speed. My aircraft has two prop engines and needs to get to around 460 mph.@WNP78
@Egorka2001 thank you
@ProjectVideoGame try
(Brake=clamp(Brake,0.5,1)
&TAS>
your_speed)?
value_you_need:
else_valueHow to activate something with brakes on and above a certain speed
is there any way of storing values? e.g. variables, delay lines, etc.
@WNP78 thanks!
@Egorka2001 yes
@WNP78, does it mean that if I use
rate(GS)
, it returns an acceleration value of my vehicle's ground speed?Inputs that activate based of weapon selected/name
@WNP78 Can I ask is it possible to make the magnet turns on and off more rapidly?
thx
How to do landing gear w/doors (with explaining to can use it more than 4 times (Im good at xml modding) )
@MossySasquatch SelectedWeapons = "Boom 25"
hope it works on mobile
how does the
SelectedWeaponName
input work?@rexzion abs(x) * -1
Is there a way to get the "abs" function to get the negative value instead of the positive?
Is there any way to get azimuth and elevation angles from my aircraft to my target? I want to make self-operating turrets for my bombers
@WNP78 Thanks so much! I couldn’t figure out what to do as pingpong wasn’t working for me. I guess I needed the time variable in there
@PETG I suppose something like
(Fuel < 0.1) & (pingpong(Time, 1) < 0.5)
would work for that.
Okay, thanks
@MossySasquatch if you're on mobile, there's a known bug, yes. When we get round to releasing a new version it should work.
Hey WNP78, I’m trying to learn some Funk of the Trees, but I can’t figure out how to make something alternate between 0 and 1 once a second. I have the code to activate the loop, just not the loop code. Anyway you could help?
It’s for a magnet that turns on and off to make noise when your fuel is low.
@WNP78, I tried putting the weapon name in quotes and still nothing. Suspect I may have come across a bug.
@MossySasquatch The weapon name indeed must be in quotes (")
Anyone have any idea how to use SelectedWeaponName? I'm trying to make a jet with deployable weapon bays, and I've tried clamp01(SelectedWeaponName=Boom 25) but it doesnt do anything. Do I need to have the weapon name in quotes or parentheses or something? Any help is appreciated. Thanks
How to make a beacon light activate when an activation group is off? I'm trying to figure it out for maybe 20 minutes, no luck..
edit: nvm found it out, i did "Activate8 - 1" in the input.
@Panthers4741 for that, you could simply do
-VTOL + Roll
, orRoll - VTOL
.@Panthers4741 yes, you can input any expression like this into say, the
input
field of anInputController
, if you're on mobile with overload, but you seem to know how to use XML. It'll also go in any activationGroup field if you make an expression with a boolean outputWhere i can inter or write those input??
Xml??
@WNP78 sorry for tag, but I have tried almost everyone else and either the person i'm asking has no clue, or I've been completely ignored. So I'm trying to make a set of landing gear that breaks (basically bends out of shape) when the plane gets above a certain speed. the code I'm using at the moment is
LandingGear=0 & IAS>950 ? clamp01(sum(IAS)) : ((sum(IAS))>950 ? 1 : 0)
(ignoring the 'amp;' bit). obviously this could be slimmed down more, but it works fine except for the fact I seem to have created a device that activates semi-randomly. I think the problem is with thesum()
function, as it provides the total sum of values, but I can't find a way to retain the highest IAS reached. Is this possible, and if so, any chance you could show me how to do it?tanksss
Ok
@PieroKH2B should still work, try doubling horsepower instead of power
@Zoowarp too much thanks but it's for a Ta 152H
@PieroKH2B what you could do is
clamp(Throttle,0,(Altitude/10000)+0.5)
, and also set the max engine power to 2. this will result in double power at 5000m i think. however this will mean that (if you are using afterburning engine) afterburners will only engage at about 4500m and sounds are off. for a better one you will need if statements (a?b:c
basically ifa
thenb
elsec
) but i cant help you with those because i am yet to experiment with them myself.@Zoowarp Yes
@PieroKH2B do you want it to have throttle input too?
@WNP78 Is there a code for Make the engine get More power at a certain altitude
@WNP78 thank you! have a nice day
@Egorka2001 yes, sorry, I realised this page was outdated. See the operators section now.
@WNP78 ok, thanks! btw, are there any boolean operators?
So Funky Trees are that i use for xml modding? (ex to gun: tracerColor)?
@WNP78 thanks !
@ZHUAREVONI for limiting the range of an output you can use the
clamp
function. ie,clamp(Pitch, -0.5, 0.5)
would limit the value to between -0.5 and 0.5@Egorka2001 Bitwise operators wouldn't make sense since FT only uses float, bool and string types.
@LuftWaffleHansIsAwful yes, it works, but with some problems
@ZHUAREVONI have you tried to adjust the min and max in the inputController?
@WNP78 will bitwise operators(such as |, &, ^, left and right bit shift) be added?
@WNP78 hello again, i need your help...
i'm just working in a fighter with automatic canards, i just adjusted the angle off attack input, but exist a little problem. i dont know that command put to limit the maximun movement angle of this canard, because in stall (90°vertical fall) the canard reaches 180 degrees, here its the method that i use in the rotator:
inputController:
min -1
max 1
input: AngleOfAttack/0.5 - 1 + Roll/-0.08 + Pitch/-0.05
JointRotator:
range 1
speed 1
@Aerofy yes, that is possible.
Are conditional operators possible? As in x > y ? 1 : 0
@switdog08 there are already posts up asking the same question - they have very good answers but i cant rmember any
@WNP78 @SnoWFLakE0s
I have a question.
I need to know how to make an input with a range.
For example, I need to make a control surface that is only active when pitch is between certain values. How would I do such a thing?
@ItzP1N3APPLZ
No problem
If you need any help, just ask me
Ok thanks@switdog08
@ItzP1N3APPLZ
You just set the input to IAS/x
With x being whatever your stall speed (mph) is divided by 2.237.
.
However, this would cause your light to be on whenever you are stopped or taxiing. To make it more realistic, you need to add another conditional. To do this, you need to put this in your input row:
(IAS/9x) * (AltitudeAgl/y)
With x being your stall speed (mph) divided by 2.237, and y being the height of your design times 3.281. I hope this solves your problem. If it doesn't, I can upload an unlisted light with whatever stall speed and stuff you want.
.
Sadly, Funk'd stall lights don't work (they are always on) on the aircraft carriers and buildings, this is because the AltitudeAgl command assumes height off the ground, not height off whatever is directly below you.
@BadFreed lights are either full on or full off, so you wouldnt be able to do 50% brightness if thats what youre asking
Hello how can i set the beaconlight to react in throttle but gradually
@WNP78 Im trying the same thing ZHUAREVONI was doing, but in my case the missile won't be listed as weapon. If I however set function to AirToAir or AirToSurface they get listed and work properly.
@ZHUAREVONI yes,
function
should be set toMultiRole
on theMissile
modifier.@ZHUAREVONI So you're saying how to make a custom guided rocket or change the name or something else
first of all.. hello, it exist any way to blend the guided weapons objetive type? because i want to make a Guardian variant that can lock on ground and air targets
@WNP78 wait how do I access it though?
Is it possible to get the direction of motion horizontally? I am thinking along the lines of an automatic stop moving for hovercraft.
@goutboy411 it's exactly the same
What about the android version?
@cedblox332
.
Here
How do you arrange these inputs in order to work?
Is there a way to make a stall warning light with funky trees? I’ve tried experimenting with some funkytrees code but it doesn’t really work.
I really would need this for my landing gear. I need the landing gear doors to have a delay as to when they should close or open. I literally don't understand any of this stuff. I'm not that smart sorry lol. But I'm trying to use other people's landing gear rotators but they don't work exactly as I need them too. If anyone could simplify this then thanks. But I don't really expect a simple explanation for how to work this funkyness.
Would love to watch a video that show how all this things can work in an actual build
Hi, man! Will you update XML Properties file?
It would be nice if they would add sensors, like (id of the sensor(AltitudeAgl)), it would be like a cockpit.
Hello guys, first of all, I really hope that all of your families are okay. Now, my question is, where to find funky trees ?
why not add something like when the suspension moves up or down by 1 or -1 then the part will do whatever I need it to like roll right or left or pitch up or down why not something like this? it would be nice if you did have this because it makes offroad vehicles way much easier to build and handle with
It’s quite complicated...but not at the same time. first off if your on android I don’t think it works I’m not sure, but iOS has it. so you can edit size, weight, and a lot of other stuff via activation groups and other listings above. @Dragons103
I don't get how it works. Does it work for all devices? And on what do I edit inputs?
can someone explain how the repeat command work?
Is it available on my platform
How do I download update for my samsung galexy tab-A
@Tessemi From my understanding, it seems like we can make a custom autopilot that can perform standard airliner maneuvers with full PID stabilisation but we won't be able to easily stabilise flips and rolls
@WNP78 Yeah, that makes sense. I should really try these things myself a little more lol. Guess I'll have to wait a bit longer to have a PID rate-stabilised aircraft.
It'd be great to have RollRate, PitchRate and YawRate functions that simulate a rate gyro as opposed to a horizon gyro
@Tessemi Pitch should be, but still would do the -180 to +180 thing. I'll add some more functions next update hopefully.
@LiamW @Tessemi rate(RollAngle) seems to work well for roll rate. But it's not 100% accurate because of just rotations... Rotations are rotations and rotations are weird. Your roll angle can change without actually rolling. Say you're banked 15 degrees to the left, with the nose pointing at the horizon. Then pitch up through a full loop without touching the roll, watching your artificial horizon on the panel rotate as your roll angle changes. Also,
rate(RollAngle)
will give very high values when the roll angle goes from -180 to +180 (when doing a full roll).@Tessemi Angular velocity is defined as "the rate of change of angular position of a rotating body."
That's what rate(PitchAngle) means. PitchAngle (or RollAngle, etc) is your 'angular position' and rate measures how that changes over time.
And yes, the units are degrees per second
@Tessemi I wouldn't say PitchAngle and RollAngle are fixed. As the aircraft rotates, its PitchAngle, RollAngle, etc will change. By measuring the rate at which this angle changes with rate(PitchAngle) you should obtain the angular velocity.
But again, I haven't tested this yet
I’m trying to make something which has a rotator which alternates from 1 to -1 every second, the way to do this is by raising -1 to the power of n ( in this case
Time
) but for some reason it doesn’t work, the function I am using ispow(-1, Time)
if anyone has any advice or ways of fixing this please can you reply, thank you.EDIT: fixed by putting
floor(Time)
@Tessemi I understand that would be expressed by rate(PitchAngle) and rate(RollAngle) but I haven't tested it yet
New functions are for weapons like wing deploy speed for cleavers right? @jamesPLANESii
I’m so happy there’s some new functions! 🤩
Reckon you could update this for reference plz? :)
@SnoWFLakE0s ok, nice. but why do our statements not work? Did you fix yours?
@MethaManAircraft
.
A funky trees input will override inputController attributes.
Also how do the min/max attributes in the input controller work? is it like clamp(input, min, max) or lerp(min, max, input) ?
Problem for reheat:
floor(Throttle) * clamp(log(TAS / 340, e) + 1, 1, 1.5)
does not through an error but just doesn't work... I checked 5 times...
Think it's the same problem as @SnoWFLakE0s ...
Would be nice to get at least error messages similar to py in the console possible in the next patch... (if not already in the works)
@AwesomeCronk cool can't wait to see it
With pi, do I just type in
pi
to get pi? Or do I have to type in the actual pi key?Edit: nvm I worked it out lol
Oh yeah lol I didn’t know arc-sine was the same as inverse sine @WNP78
@jamesPLANESii presumably you're talking about an inverse sine. Also known as an arc-sine. Have another look near the trig functions.
How do you do sin^-1 etc?
Great for custom landing gear!!
Will the next update fix the mods on mobile to be fixed because I made a plane with a lot of mods but when I was going to use it with out knowing the mods weren't working and my game crashed and my simple planes files were corrupted and I had to buy the game again because it said that I didn't download it before can you help please?
Math
@DPSAircraft it's the time in seconds since the start of the level.
@WNP78
.
No, it just doesn't want to function. Manipulating any of the variables should result in some change at least, so that's confusing me.
Hey @WNP78 my question is not about Funky Trees but you did write the guide. I'm having an issue where I can't get Overload to accept my custom missile functions. All the other options I'm trying to customize on the Cleaver work, but it's not taking "AirToAir" with or without quotes.
Edit: never mind, got it to work. I think I just typed it in with the first A being lowercase and then it worked. It even corrected it for it to be all first letters to be uppercase.
@SnoWFLakE0s no plans for variables to be added, though I can see how useful it'd be... There shouldn't be any limits as such though, is that giving any errors in the console?
@WNP78
.
Will we potentially get variable assignment features? Also- is there a limit to the number of functions the system can process? This statement isn't evaluating properly, even when I manipulate the included inputs:
((((Trim*10000*cos(Pitch*90)) - sqrt(pow((Trim*10000*cos(Pitch*90)), 2) - ((96.177249*pow((Trim*10000*cos(Pitch*90)), 4)+19614000* (Trim*10000*sin(Pitch*90))*pow((Trim*10000*cos(Pitch*90)), 2))/1000000000000)))*1000000)/(9.807*pow((Trim*10000*cos(Pitch*90)), 2)))
@WNP78 if you find any other way of doing more or adding things like the kraken in iOS please.
@Zanedavid
Oof. Oh well.
Dang, well thank you, this has given me more to mess with :D @WNP78
Not likely, I looked into that and fuel is just a number and weight, not really an entity per fuselage, it’d be cool to implement that @JohnnyBoythePilot
Is it possible to use funky trees to make an engine drink fuel from a certain fuselage block before using fuel from other fuselage blocks? (i.e. fuel drop tanks)
@Zanedavid yes, I did write the parser/compiler myself.
@DPSAircraft Helmet Mounted Cueing System. You use it to slave your IR missile and radar lock to where you're looking. Skim through this: https://www.youtube.com/watch?v=OoWOGsER29Q
If we had access to view angles, we could make gimballing guns (so no black magic with activation groups and flight controls), we could expand the capabilities of dogfights... At what point does SP become too serious? Maybe I'm setting my expectations a bit too high.
@Zanedavid ok i was thinking about it because i was trying to simulate airbrakes on a truck
Did you have to code the whole funky trees on your own? @WNP78
Your best bet on acceleration is VTOL engines, they get to top speed quick @Stormfur
Not that I know of going extremely quick, but just put input as Activate# and then there’s ZeroOnDeactivate, make that true. , Ide also suggest putting in brakes if you want your speed to drop fast upon de activating @Stormfur
Is there a way where you can modify a jet engine to by the press of an AG, throttle to max extremely quickly and shut off?
It would be pretty cool if we had some way to get data from the view. Like an HMCS sort of thing. Love your stuff!
@ArcturusAerospace (sign (Altitude- 6096)+ 1)/2*Brake
@phd614871 It doesn't work for some reason. I'm copy & pasting the formula, but it still doesn't work. I changed "Input" to brake.
@ArcturusAerospace Like Roll, Pitch, Yaw,Throttle
@phd614871 What do I plug in for "input?"
Can you invert a magnet so it’s pushing away?
@ArcturusAerospace (sign (Altitude-6096)+ 1)/2*input
@phd614871 Could you please give me the input for some thing I want to activate above 20,000 feet? I'm making an air-dropped tank.
@Person05 (sign (300-AltitudeAgl)+ 1)/2*input
fire cannon and a bomb shooter at the same time using the “fire cannon” button? Is it possible?
I’m trying to make a thing to activate when it’s below 300 meters but it doesn’t work I put in AltitudeAgl<300
@EngineerOtaku change the speed.
@Brields95 That's what I do currently. It doesn't respond like the stock control surfaces (It's SO SLOW...)
@Zanedavid that just causes the plane to yaw.
@EngineerOtaku try putting a wing on a rotator
@EngineerOtaku currently it's not supported on control surfaces, sorry
@EngineerOtaku your using ailerons from wings? Not sure if you can change that, but you can use brakes on custom made wings, attatch a rotator and set min to 0 and make the brake have 0 mass too, that is all I can think of
I could use some help with figuring this out;
So I'm building a jet that uses Spoilerons for roll control. I want to test using the built-in ailerons as a substitute (since custom control surfaces can be iffy in terms of response in-flight from my experience). I want the Ailerons to ONLY move in one direction. How can I do that?
I tested abs(Roll) in the input ID and it locked the aileron in place.
@DPSAircraft
.
This is an invalid statement. Also, what are you trying to say? It's not making any sense.
@SnoWFLakE0s yes, but just horizontal. It's like the horizontal equivalent of AngleOfAttack. Relative to airflow, not ground.
@WNP78
.
Would
AngleOfSlip
be the angle between the aircraft's current direction and the direction of its velocity vector (assuming no wind)?@robloxweponco something along those lines is on my personal list.
Are if/or statements planned to be added?
Reeeeee ok darn @Armyguy1534 @MossySasquatch
@Zanedavid if it says input, then put LandingGear. If not then you cant
@Zanedavid,
Been wondering the same thing. I dont think it's possible because the hook is looking for an activation group, whereas landing gear is an input controller. One possible idea is to place the hook on a hinge rotator set up to lower with gears and skip the activation group altogether, but I dont know if that would work or not without testing. I fear that the hook doesnt "operate" unless its group is active. Worth a shot though
Do you know how to make it go down upon activating Landing gear ? @Armyguy1534
@Zanedavid ok
@Armyguy1534 WAIT! I figured out I needed to put activateGroup as 0 but now it stays down...
@Armyguy1534 so the arresting hooks activationGroup will not save when I put its activation as LandingGear, do I need to input something else?
@MossySasquatch
.
Use trigonometry.
@WNP78 Awesome, Thanks!
@Thorne not at the moment, but planned.
I’m not very mathematically literate, is there any way to calculate the rate of change of a variable with these at the moment?
@FlipposMC Pretty sure it's the same units as AoA, ie -180 to 180
Question:
AngleOfSlip goes from 0 to what angle?
Is it negative in one direction and positive in the other?
Suppose I fly heading 000 with the airflow dead on (000). If I use left
1
degree would the input be1
,359
or-1
?Lol WNP78 is probably on break, when he comes back he’s gonna be loaded with questions, feels bad man
so, how i can use this whole math thing ? any tutorials ?
Hello WNP78... In the New Update, There's the "weapon naming and multirole weapons." What does that Mean, and how do you do it?
Is it possible to be able to get the speed of an aircraft along its xyz axises? I want to make a helicopter that can neutralize drift to make flight easier
I need a specific guide for those frequently used inputs?
@DPSAircraft okay happy new year, I'm 10 minutes late because I was recording fireworks
@DPSAircraft you better wait 6 minutes, ain't no new year for me yet ;)
@DPSAircraft I kinda like yo try and mess around with things, I cant make things if I cant visualize and test it. So I can kinda only get help with stuff I'm working on and cant figure out how to fix, and I havent started on anything with the funky trees. Bht if there was something like Vizzy then I'd probably do it because it's just so much simpler.
@DPSAircraft I understand logic a bit, but I dont understand how to write it in code like this, I haven't learnt that. And writing code with "blocks" like Vizzy is much easier but still let's you do basically the same thing.
@WNP78 Any plans to make this visual? Similar to Vizzy in SR2, it would be easier to use this then (at least for people who aren't very good at this, like me)
@WNP78 hello I speak for the trees
Here are so many funcs , but why don't have logical functions such as "if", "while", "for".etc, the most basical funcs of programming ? QAQ
I heard SR2 have it ? QAQ
Just rename those basical logic-funcs in case some errors of identification, seems very easy !
Is there a way to make something activate when your aircraft touch the ground? (any ground altitude)
where to use these math calculations?
How would you make a rotator that rotates infinitely? Or a rotator that loops -1 to 1?
I thought it would be simple to use "repeat" function but.... Well, any help would be greatly appreciated
FD inputs for pitch, roll and yaw rates would make for better stabilization using RCS
Is there a way to overload the cannons to fire salvos in a timed interval? Like a battleship? @WNP78
ok, i get it now.
It's not obvious at first but it does have it's uses...
and for the flight data?
@MethaManAircraft
lerp(a, b, t)
is a linear interpolation. It gives the value betweena
andb
at a proportion oft
So if
t
was0
, the output would bea
,if
t
was1
, the output would beb
.Between these values, it scales linearly between
a
andb
- for instance ift
was0.5
, then the output value would be half way betweena
andb
.More than Half of this stuff is too big brain for me lol
Could we also please get the x,y,z angular momentum of the aircraft as inputs?
I'd never heqrd of lerp or inverselerp before...
What would be their uses?
@RamboJutter To do pitch and trim you do..
Pitch + (Trim / 8)
. This will make the trim travel an 8th of the pitch travel. Undercarriage doors, that's a bit more complex and I'm not sure it's doable in this version, but maybe with some upcoming features I have.@WNP78 this stuff is great but really makes my head hurt, how about posting a few common formulas i.e. stick this in your rotator input and it lets it do pitch and trim, or use this on your undercarriage doors so they shut slower than they open etc. Im honestly lost on this stuff and its really demotivating.
@WNP78 I’m using PitchAngle
@Reuben201103 that looks like it'd be fine in itself, what are you using for
x
?If I want to clamp a negative value e.g:
clamp(x, -180, 0)
It doesn’t seem to work, is there any way to work around this so that I can make the input work only when the value of x is negative?
@WNP78
@jamesPLANESii what attitude?
@WNP78 it all makes sense now, thanks
And could you set it to randomly choose some time between 3 and 100
Or make it Changeable via trim or vtol
Like to make flak from one cannon with proximity Attractive like the ww2 ships
Can you set like 3 to 100 life time of shells from the new Cannon
Sorry, I just thought This had to do with xml and changing the aspects of the pieces.Thank you @WNP78
Stop with the attitude man @WNP78
@Zanedavid they're standard hexadecimal colour codes, and nothing to do with this post.
Is there a color list? How do I know what the letters and numbers stand for? Like 222FFA7 for engine exhaust is blue I think,
@jamesPLANESii and @Kakhikotchauri1 I've already said I'd like to make that in the future.
@DerekSP funky trees currently only works on beacons and inputcontrollers, not control surfaces. Activate1 is -1 when AG1 is disabled, so
Throttle - Activate1
=0 - (-1)
=1
My brain hurts
Or is it possible?
I wish there was a rate of change function. It’d be so useful, for example variometers, turn & slip indicators, and fuel flow indicators will be possible
@WNP78 what about comparsion operators < > ?
I can make this v<300 or v<300
but i can't make this
Altitude>300 or Altitude<300.
What about it ?
Plz answer
Thanks
@DerekSP
.
Hmmm.. not sure what the issue would be. I'll check in with you if you need it.
@SnoWFLakE0s I am using the builtin Overload for it, could that be the issue? Although some other statements work just fine
@DerekSP
.
I guess I misunderstood. Regarding your original question, every input statement you've listed should work. I don't see any reason for it to not work + it works for me... Maybe your syntax is wrong or you're putting it in the wrong place. Are you sure you are writing
input=statement
?@SnoWFLakE0s there's no mention of activation groups in the post, unless I'm completely blind. To be clear, I'm talking about inputs in activationGroup, not activation groups in inputID
@DerekSP
.
Of course, clearly you haven't even read this post through. Check the inputs section.
You could easily use this to create the most confusing plane ever. Throttle up, and it pitches down. Roll left, it throttles up. Yaw right, it rolls left. Attempt to launch countermeasures, and the aircraft self-destruction, and so on.
How do you combine functions? Say pitch and roll? Would it just be a +? And how would you do an "if" statement? For example, if AGL is below 500, light blinks?
Is there any possible way to make something like a turret with these?
IDK if anyone asked for this, but using '>', '<' and '=' would be nice.
@SnoWFLakE0s activationGroup can be an input?
Hello I was wondering if clamp() is similar or the same as the map() function in JavaScript.
@RASEN1914
.
I've already done one. Check it out here.
@DerekSP
.
Troubleshooting for Funky Trees:
1. Syntax (spacing)
2. Check for invalid variables
For your specific case, you can set activationGroup to
- Activate1
to achieve the function you want.@WNP78 I have a question. I have this on a propeller input:
clamp01(Throttle - Activate1)
I want the propeller to throttle only when AG1 is inactive, so that whenever AG1 is 1 it'll negate any Throttle value between 0 and 1.
The issue is that for some reason this function makes the engine go full throttle on spawning, when both Throttle and Activate1 should be 0, so
clamp01(0 - 0)
should result in 0, right? Why doesn't it work?
EDIT: is there a way to show all the input values of the aircraft so that I can debug better?
EDIT2: I now also tried having clamp01(VTOL) and abs(VTOL) on a control surface input, and it doesn't move at all
@ChiyomiAnzai Andrew removed it on older iOS devices and versions as the image picker is unavailable on these
@SnoWFLakE0s it uses C# single precision floating point numbers. See here
oh no i don't understand
I think we need a guide for this, i don't understand how this works... lol
It would be awesome if we also have the derivatives of the current Flight Data. I think (/hope) it is really easy to add those and they allow even more advanced fly-by-wire.
so I could make flaps go down when below a certain speed?!?
@WNP78
.
A question- how many digits can the input system process? To me it looks like the system can't calculate numbers that are more than four digits, such as 1000, or 0.001.
Also, how long of an input can the system handle?
@WNP78 the tank gun also needs to have barrel length in ft/m and the velocity needs to be in F/S instead of MPH
@WNP78 btw yall should try to put tracks 2 into the 1.9 that would help out a ton of mobile users, also will you put customizable inputs for the tank cannon since some of us want the input to be be fire guns, and is there a projectile type for APCR shells on the cannon?
@WNP78 whoops I meant no the Arcsin is different than the csc, the Arccos is different than the sec and so on. Arcsin is Sin^-1 csc is 1/sin
@ChisP they're right there at the bottom of the list.
@WNP78 yes
@WNP78 we have funky trees now what about funky activation grups ?
This is a my suggestion
Inputs for activation grups.
For example when i move vtol hinge roator activated and i can control it using roll.
Or when my altitude are more than 1000m hinge roator activated and i can control it using roll
@WNP78 mm i already know. If i need inverted i can use - instead of +
@WNP78 hi. Now we can make multiple inputs for example
Roll + pitch
But i have question i need make normal direction roll + inverted pitch can i make this ?
@ChisP are you talking about inverse trig functions, asin, acos, and atan?
Yes,like that ! Thanks man,You always have the best stuff !
@Leehopard
@DeathStalker627
Like this? it doesn't need 1.9, was possible before 1.9
Air-to-ground
Sample here
I’ll need some big brain time for this.
BTW do you have sec csc and cot those are important or do we just have to put 1/sin 1/cos 1/tan?
Altitude - Aircraft's altitude in metres
AltitudeAgl - Aircraft's altitude above ground level in metres
GS - The speed relative to the ground (m/s)
IAS - The speed relative to the air, adjusted for the desnity of the air (m/s)
TAS - The speed relative to the air (m/s)
Fuel - The amount of fuel remaining as a proportion of capacity (0 to 1)
AngleOfAttack - The angle of attack (angle airflow vertically meets the boresight) in degrees
AngleOfSlip - The horizontal equivalent of angle of attack (degrees)
PitchAngle - The pitch of the aircraft (degrees)
RollAngle - The roll of the aircraft (degrees)
Heading - The heading of the aircraft (degrees)
Time - The time since the level loaded (seconds)
DOES THIS MEAN WE CAN FINALLY MAKE ACCURATE INDICATORS!!!!!!
@WNP78 Sorry you ping you again, but just haven't heard about this yet- the cannon part's projectileVelocity attribute is not in SI units while all other similar ingame XML traits are. I'd just like to know about this.
@CRJ900Pilot There already is one.
To all people confused, here's a guide.
@DeathStalker627 Perhaps, if you utilize the ignitionDelay attribute. It'll require 2 missiles, but I can see it working. One to just move the missile in the general direction, the second to guide it in.
@WNP78 Is it possible to code a missile that flies like a FGM Javelin ?
I was watching some videos about coding the World in Conlict : Modern Warfare.
-> https://www.moddb.com/members/blahdy/blogs
This might looks pretty complex,but I want to now if top attack launch is possible now ?
Did you try using LandingGear input, everything else is working as intended but that input is a bit strange.
E.g.
1.) Input: LandingGear
2.) Input: LandingGear + 0
Results in different behaviour I believe
@WNP78
@Leehopard you mean the rate of change in x, like a derivative? I'd like to as well as a sum/integration, but it's of course more complex than other functions. It would have to be integrated into the compiler, but I did make the compiler so it's possible...
I always tell people to build a tree when they make a post asking what to build, so this is quite the coincidence lol
delta(x)
@WNP78 thanks for answer. Also what about your mod underwater camera ?
Also maps and plugins still working in 1.9 this is awesome. This means i can still make maps.
Also suggestion for you
What about to add brake inputs for resizeable wheel. I mean we can't brake single wheel now. But if you make brake input for it we can brake single wheels using inputs.
This is help designers for developing tanks.
What about it.
Thanks.
@Kakhikotchauri1 the smoke effects occur when touching down with enough speed with resizeable wheels. This is also unrelated and should be on the main 1.9 post.
@WNP78 plase answer me. I have another question. I can't see smoke effects when i touchdown i why ?
Time to build full working cockpits
@CoolPeach regarding your bug report - I can't reproduce this issue. I have 1 rotator assigned to
Activate1
, and one toActivate1 + 0
(which means funky trees gets activated, instead of default behaviour). They act identically. Could you provide an example?I would like to suggest a "changerate" function (differential)
For example, the change rate of altitude would be vertical speed
the change rate of heading would be turning rate (used for turn coordinator)
With the addition of overload to the stock game, could everyone use these features? If so, could you write a cheat sheet with all the inputs and what they do? I’d also like to say thanks to everyone at Jundroo, these features are amazing and the game wouldn’t be anywhere close to where it is without you guys
@WNP78 i have a request... May you please add an option of setting, as an example, "TAS>300" as an activation group, so then a part won't work until the TAS is above 300?
So, would I put that in the input thing or the min/max thing? @WNP78
@CoolPeach no, they were a special case added in by HF, they still work on their own for backwards compatibility, but they don't go with the new system.
@spefyjerbf not at the moment, but I'd like to at some point.
@jamesPLANESii if you wanted x to be between -2 and 2, then you'd do
clamp(x, -2, 2)
heh. Lerp.
This is a why i needed for imputs. Thanks
LOGIC GATES!!!
Does this mean we can recreate the MCAS in SP?
You should add PitchDown
More like funky maths. First time having fun in maths since it's for a game. I'm sure that this will improve the math skills of some users
@jamesPLANESii if they even realize it. They are still complaining that they don't have mods on discord lol
Scripting language for SP when
Am I the only one who thought you were talking about actual trees.
This is some amazing news!
Now our possibilities are truly going to be endless!
Does this also work with booleans (if they still exist)? Such as, for example, if I was making a control system - would it be possible to use an input that would look something like “RollAngle > 5” for a thruster to fire at a roll angle of over 5 degrees?
By the way, this is absolutely awesome! I’m super hyped for this update.
It’d be really useful if you could do a short video tutorial on where to put the functions and how to use them etc
Out of interest, do the (v< or v>) values work within these functions?
Overload has been put in the default game now so iOS should be able to do XML now (or at least when the update comes for them lol) @Stormfur
If I wanted the maximum input to be
max(2, -2)
, would I put that in theinput
location or themax
/min
location?It's time to get FUNKY
I thought this would be actual trees
Me Like Funky
Also I have one suggestion. Could you update the simple cheats document? Like with the new attributes like waterproof and stuff, and also copy paste this inside the document somewhere, its convenient to have a cheat cheet for everything in 1 link.
.
Also great job on all of this, it sounds like it has a lot of possibilities to it!
Wow this is complex math stuff right here.... or I'm just stupid, both are fine. Well this will take some learning, but that's how it was with learning XML too.
I cant seem to get ActivateX and a control surface to move independently of each other on one rotator. Im trying to make 'spoilerons' but I cant make them act as an aileron or a spoiler, instead I can only move it as an Aileron when it is extended as a spoiler.
Wow, I’m stoked! Absolutely gonna go to town with cockpits and accurate flight controls for my new F-16! Very excited!
@Bman01 you always could with XML but if you are a iOS player than ok
Who knew SP turned into a math class lol
I can't wait to test this stuff out
:-)
So I can make fireguns pistons!
I’m deffinately going to make a 100% functional ASI and altimeter rn lol
OH MY GOD
100% FUNCTIONAL COCKPITS
THIS IS ENORMOUSLY AMAZING FIR ME!!!! 😃😃😃😃
@WNP78 So could someone make a stock fly by wire using these
@WNP78 oh okay. So now we can make working avionics like speedometer or altimeter? That's even better, detailed cockpits will no longer be only aesthetic with fake gauges.
@Oski no, currently there's not much for having.. thresholds as such. Comparison operators (<, >) are something I'm considering in the future. So currently you could set a rotator to follow an input like speed or altitude etc. Theoretically, you could do the beacon thing though. Beacons activate when their input isn't 0, so you could make it work with say,
min(0, IAS - 330)
which would be 0 if IAS was under 330, therefore would light the beacon when IAS > 330<3
I... Still don't get it I think.
We can assign multiple inputs to parts (say, make one rotator move on Pitch, Roll, Brake and VTOL);
And now:
We can make certain things activate at, say, 330m/s (like "sonic booms") or at certain AOA (like, flashing beacons at over 45°)? Or did I misunderstand that?
Bring the funk!