How can I create a list of element such that when the input condition is part of the list, theoutput is x and otherwise the output is y?
I can’t create a full condition each time I employ a boolean operator, since that makes my codes hundred lines long.
@Sadboye12 hah Nopers. Huax had kindly answered (and solved) my question that I --albeit mistakenly-- thought was similar to his own... So I wanted to return the favor by trying to find some folk who may be able to answer their question... ^_^
.
Hopefully, then, your
A ? B = C
comment is indeed in relation to Huax's situation and not mine. lolThanks for responding!
@Formula350
.
GearDown is a lot more intuitive.
Quite simply, if the gear is down, GearDown = true, and if the gear is up, GearDown = false.
.
The same applies for Activation Groups.
To take an example with AG1, if the AG1 is on, Activate1 = true, and if AG1 is off, Activate1 = false.
.
Basic Funky Trees documentation and guides are available at the FT guide page.
@Formula350 i legit thought this was your post lmao
you can use ternary operator which is
A ? B = C
if
A
true thenB
elseC
i hope this is what you are truly lookin for or i may have miss understood your question
soo you can put conditions in A, and in B will be the Input if the conditions are met, if the conditions are not met the input will be C
@edensk or @Sadboye12 Do either of you gurus happen to know the answer to Huax's question/issue? :}
@Huax Either I'm a complete idiot, or the Input entry was definitely NOT there when I originally added them... O_O
I went to add your code just now, and lo and behold, there was "Input" already there, with None set....
I feel like I'm losing my mind lol
.
Either way... Thank you! :)
@Formula350 Use input=
1-LandingGear for you beacon, the code is simple, when enabled it’s 1, disabled is -1
The only reasonI asked this simple question is because my code is getting 100 lines long
*grumbles* Note to Self: do not upvote before submitting comments, as said typed text will be lost due to the page freshing... :\
This kind of sounds like the question I was asking myself yesterday!
In my case I was needing to have it so performing an action would toggle a Beacon. Specifically, if the Landing Gear is down the beacon is On, and if the gear is up the beacon is Off. (whether it's relevant, I was specifically using
LandingGear
input, notGearUp
orGearDown
since that's beyond me currently.).
My only worry is that FunkyTrees may not even be able to define whether an AG is
Enabled
orDisabled
... <_>