Profile image

XML help/ Funky Tree

253k WinsWings  8 months ago

Can someone help me to write this code to start and stop the engine:

I am using multiple engines, and I need the XML to control certain engine as follow. I will credit for this. Thanks so much.

The Engine will start at IAS>150 mph AND will shut down IF the throttle is less than 25%


Funky Tree Notes for me

and future reference for everyone

Funkey Tree (functions)

https://www.simpleplanes.com/Forums/View/1042680/Funky-Trees

Funky Trees Quick Tutorial Linear Interpolation

https://www.simpleplanes.com/Videos/View/1818461/Funky-Trees-Quick-Tutorial-Linear-Interpolation

Snow Flake's Funky Guide

https://snowflake0s.github.io/funkyguide/

  • Log in to leave a comment
  • Profile image
    253k WinsWings

    @MrCOPTY @QuesoAirlines @GuyFolk
    I was looking for some Boolean Operators, and the Selection Operator, used in Funky Tree. Now I found them. Since I am clear with my concept, but getting stuck due to syntax error. Anyway, thank you all for helping me out. And I will definitely need your help in the future too. You guys are amazing.

    +1 8 months ago
  • Profile image
    253k WinsWings

    @MrCOPTY yes, I noticed in your builds that you separate out by declearing the variable names.

    +1 8 months ago
  • Profile image
    253k WinsWings

    @MrCOPTY Thanks so much, I will let you know,

    +1 8 months ago
  • Profile image
    68.7k MrCOPTY

    @WinsWings Issues? Tell Me, May I Can Help

    +1 8 months ago
  • Profile image
    253k WinsWings

    @MrCOPTY Nice!!!! I was using the FT cheatsheet the same link you posted. But still, there are some issues, thanks anyway

    +1 8 months ago
  • Profile image
    68.7k MrCOPTY

    @WinsWings Feel Free To Ask Any Code, I'll Try My Best To Do, Or Join My Discord Server, We Have FT Class Room (And Fuselage Filling Class Room Too)

    +1 8 months ago
  • Profile image
    68.7k MrCOPTY

    @WinsWings Those Are The Function Used In FT, Now Try To Use To Create Simple Codes
    Funky Trees

    8 months ago
  • Profile image
    68.7k MrCOPTY

    @WinsWings In Fact This Is FT Not XML, XML Are Language That Used By Game To Generate Parts, FT In Language That Used By Parts As Input

    8 months ago
  • Profile image
    68.7k MrCOPTY

    @WinsWings You Can Add Or Don't Add Spaces, Personally I Prefer Add, This Help To Organise FT, And Suggest Using Variables, So You Can Modify Codes Easily (If You Have Code For Lot Of Parts, Replace The Code Whit A Specific Name, Open Variable Setter Then Use That Name As Name For Variable, And Put Your Code In Variable Body, Now You Can Modify The Code For All Part Easily)

    +1 8 months ago
  • Profile image
    253k WinsWings

    @MrCOPTY @GuyFolk @QuesoAirlines
    Can you recommend me any reference for writing such XML lines? since I knew the concept but had difficulty with XML's syntax /writing style. I have some math and programming knowledge from a few years back - Thanks a lot!
    .

    For example, adding or not adding spaces:
    (IAS > 67.05) ? ((Throttle > 0.25) ? Throttle : 0) : 0
    --- OR ---
    (IAS>67.05) ? ((Throttle>0.25) ? Throttle : 0) : 0

    +1 8 months ago
  • Profile image
    253k WinsWings

    Thanks so much to @QuesoAirlines for making this explanation video https://www.simpleplanes.com/Videos/View/1818461/Funky-Trees-Quick-Tutorial-Linear-Interpolation

    +1 8 months ago
  • Profile image
    253k WinsWings

    @GuyFolk Thank you. really appreciate that

    +1 8 months ago
  • Profile image
    99.9k GuyFolk

    @WinsWings
    I mean the number in the code have to be in meter per second.
    So it'll be 67.05.
    Because 67.05 m/s = 150 mph.

    +2 8 months ago
  • Profile image
    253k WinsWings

    @QuesoAirlines that will be great. Please tag me when you post.

    +1 8 months ago
  • Profile image

    I just realized that there's a big difference between my code and GuyFolk's. I'm just gonna make a short video explaining the difference and how each can be used.

    +2 8 months ago
  • Profile image
    253k WinsWings

    @QuesoAirlines thanks

    8 months ago
  • Profile image

    (IAS > 67.05) ? ((Throttle > 0.25) ? Throttle : 0) : 0

    +1 8 months ago
  • Profile image

    @WinsWing
    Correct me if I’m wrong, but woun’t that be only full or no power, atleast if you put the in “input”? Also, isn’t IAS in M/S in funky trees?

    8 months ago
  • Profile image
    253k WinsWings

    @GuyFolk So did you mean, it has to be in Kilometer per hour? 150mph = approx 240 kph?

    so did you mean
    - clamp01(IAS>240&Throttle>=0.25)
    OR
    - clamp01(IAS>240&Throttle>=0.25)*inverselerp(0.25,1,Throttle)

    8 months ago
  • Profile image
    99.9k GuyFolk

    @WinsWings
    Sorry I didn't noticed that the IAS is in mph.
    Completely forgot to convert the number lol.
    I was sleepy while making the code for you.

    8 months ago
  • Profile image
    68.7k MrCOPTY

    @WinsWings Yeah, Thx, Everything Is Fine, I'm Just Annoyed Cuz My 100th Taking A Lot Time (Still WIP), And I Don't Publish For Month Or Smth, I Just Post That Waffle To Keep Posting.

    +1 8 months ago
  • Profile image
    253k WinsWings

    @MrCOPTY Thanks buddy, hope everything fine with you

    +1 8 months ago
  • Profile image
    68.7k MrCOPTY

    IAS>67 & Throttle>=0.25 ? 1 : 0
    I Convert Value Of Speed

    +1 8 months ago
  • Profile image
    253k WinsWings

    @GuyFolk Thank you so much, I will tag you one I did

    8 months ago
  • Profile image
    99.9k GuyFolk

    @WinsWings
    Super easy.
    clamp01(IAS>150&Throttle>=0.25)
    Or you can try alternative version.
    clamp01(IAS>150&Throttle>=0.25)*inverselerp(0.25,1,Throttle)
    Try both and see if any of them fit.

    +2 8 months ago
  • Log in to see more comments