Profile image

(solved) Reverse Light Help - Funky Trees

6,433 AnOlympicWalnut  4.0 years ago

Hey SP community!

Does anyone know a Funky Trees way to enable reverse lights?
I hope for my reverse lights to enable when I back up using pitch (or pressing S). I have my pitch control set to "normal" in the settings. As of now, I have my reverse lights hooked up to AG3, and nothing else. They don't need to be at 0mph or anything, just whenever I go into (I think) -1 or click S, they turn on.

Thanks for the help!

  • Log in to leave a comment
  • Profile image

    Thanks to @An2k, @randomusername, and @edensk for helping!

    After some trial and error, I finally figured it out with your help.

    I had to use [-clamp(Pitch, -1,0)] as the code, and it finally worked for me.

    Again, thanks very much for your help!

    +2 4.0 years ago
  • Profile image
    1,182 An2k

    this worked on my unfinished project I also use pitch for throttle control
    min(sign(Pitch),0)
    I wished I remmember where I got it from to give credit.. anyways
    my setup Im using both Yaw and Roll for steering BTW..2 beacon light on each side. using codes below for reverse, left and right signal lights
    right beaconlight on its input
    min(sign(Pitch),0) | clamp(Yaw, 0, 1) | clamp(Roll, 0, 1)
    And otherside
    left beaconlight on its input
    min(sign(Pitch),0) | clamp(Yaw, -1, 0) | clamp(Roll, -1, 0)

    when you pitch down to do reverse both left & right signal beacon lights up and lights up when you use Roll or Yaw right/left steering
    Edit: guys
    @randomusername @edensk @AnOlympicWalnut and everyone else. I need help as well I need recoil using piston to cycle per shot like one cycle (piston default on extended) to retract and extend quick for every -1 ammo fired.. like fullammo = 3000.. fireweapon -1 ammo = 2999 piston will do 1 quick cycle...fire again ammo=2998 another 1 quick cycle then full auto piston sychonized to each shots fired..havent seen any sample project that use ammo counter as a trigger for a piston to sych cycle each shot...is this possible? Its for a high firerate cannon machinegun. Tried using cannon with recoil force but shake my little car into oblivion.Plz Help and suggestion appreciated and properlly credited

    4.0 years ago
  • Profile image
    16.4k edensk

    @AnOlympicWalnut My bad, I copied her formula without looking at it too much.
    -clamp01(-Pitch*100) should work fine

    4.0 years ago
  • Profile image

    @randomusername @edensk I tried using both suggestions with and without AG, but there were no effects. I have default settings on the light, only the light is resized a bit (if that has any correlation). I'm not using any experimental version of the game either, only normal. Is there anything I have to have set?

    4.0 years ago
  • Profile image
    16.4k edensk

    Beacon lights apparently activate above 0.5, iirc, so the input should make sure they activate even with the smallest Pitch input.
    clamp(Pitch*100, -1,0) should be fine.

    4.0 years ago