Starbase Tutorial: Setting up Smart Mining Lasers

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 พ.ย. 2024

ความคิดเห็น • 70

  • @DkryptX3
    @DkryptX3 3 ปีที่แล้ว +3

    You can set the min and max on RT to 180 and -180 respectively, keep them -180 and 180 on LT. Then you can control both of them with a single variable.

  • @randy80ism
    @randy80ism 3 ปีที่แล้ว +2

    Thank you very much for sharing your code it's working great for my setup. Man your the best. There's no way I can thank you for this code.. 👍👍👍👍👍👐👍👍💯

  • @randy80ism
    @randy80ism 3 ปีที่แล้ว +1

    Update: This the best code. I use it on all my builds lol. I also pair it with a zig-Zag pattern (on different yolo chip).

  • @heflar
    @heflar 3 ปีที่แล้ว +10

    heya i know a really easy way to code this with using only one variable with the turrets, if you leave LT as 180 and -180 for max and min and then inverse these numbers on the other turret then you can control them both inversely mirrored with the same input, put max as -180 and min at 180 on RT and change the name to LT and remove all references to RT in the code and it will work with much less code, now they limitations is this will perfectly mirror them so for this type of rangefinder code it's perfect, for anything else it becomes less perfect, for example i'm working on code that can use your mouse to control the turret but then each turret will require it's own angle since each turret will be pointing left or right values separate from each other and will require individual fields.

    • @ArmitageShanksMC
      @ArmitageShanksMC 3 ปีที่แล้ว +1

      Oh wow, that's a really useful tip. I had no idea inverting the minimum and maximum angle had that affect! Time to rewrite my mining laser code! :D

    • @N1ghtR1der666
      @N1ghtR1der666 3 ปีที่แล้ว

      how are you accessing any mouse input, is there a way to access that mouse steering mode from yolol or something?

    • @heflar
      @heflar 3 ปีที่แล้ว +1

      @@N1ghtR1der666 you can check the video i uploaded earlier today for an explanation on setting up mouse aiming th-cam.com/video/szokSSDdctE/w-d-xo.html

    • @armedbobery4879
      @armedbobery4879 2 ปีที่แล้ว

      Using your suggestion above, how can I add a limitation as to how far my turn tables will go?
      My mining lasers are set back slightly and below my cockpit and therefor if I were to get too close to an object the lasers will start to shoot my cockpit.
      The turn table limits don't seem to work and get overridden by the yolol.
      I modified the code already to account for pitch as well since my mining lasers are not at the same level as my range finder and I wanted the option to use the range finder without the lasers on so I have it so that those can be turned off too. Only thing i cant figure out is the math behind adding limitations.
      if :Lasers==1 then :ML=15*:RF-:R else :ML=0 end
      If :RF==1 then :LT=-87/:R :LP=-87/:R end
      goto1

    • @heflar
      @heflar 2 ปีที่แล้ว +1

      @@armedbobery4879 so limitations on turret rotation is actually why i stopped playing the game, no matter what i did or tried to do, eventually the lasers would randomly spin around once and a while and shoot something they shouldn't.... the code could be perfect and it would still happen, it saddens me that this is still an issue 4-5 months after i stopped playing, as i consider it a game breaking bug.
      the closest thing i found to a "fix" was a mining laser check that takes place to ensure the lasers are pointing within the range they should be, so in your original code you need a if x and y = 1 or something like that, then x being the ML=1 and the y=1 being a check for the angle of the turret, turrets have input range and output range, the output range is the current rotation of the turret, the calculations you put into your movement of turrets should have a min and max value so you want this to be your range, so for Y you want "if turret current angle is less than it's min value or higher than it's max value then y = 0" Y will be the check to make sure the lasers are pointing forwards to the correct angle, it's best to run this code on it's own yolol in a single line if possible so the check is happening as often as possible, because if the turrets flip 180 degrees instantly which can happen they will still get a single pulse of laser beam off which will damage something, so it's good to have a shield wall of some stronger material or double layers behind the laser turret to protect internals.
      hope this all makes sense, it's 1pm of day 2 me not sleeping :)

  • @Garybaldi74
    @Garybaldi74 3 ปีที่แล้ว

    For many ships, the basic setup is slightly different. The rangefinder is usually not at the same level as the lasers.
    I bought the Momento and upgraded it. The rangefinder is at cockpit level and the lasers are about 2 meters lower.
    This made the challenge for my script a bit more complex.
    For me, not only the rotation, but also the pitch is relevant.
    For my setup I wrote the appropriate script. Unfortunately this is not universally applicable for other ships.
    If there are then the rare ores, I can write a script with the professional chip, which optimizes the calculations with a specification of an angle.

    • @FizzDB
      @FizzDB 3 ปีที่แล้ว

      Pro chips are not available yet... atan() would save my world

  • @Engineergalaxy
    @Engineergalaxy 3 ปีที่แล้ว

    an advanced turret cradle can both to the right and to the left, I need it to move both to the right and to the left. That is, the mench has a rangefinder in the center and on the right and left there are cradles and it is possible to aim at the asteroid. Sorry for my bad english

  • @thatcat5721
    @thatcat5721 2 ปีที่แล้ว

    Simple Trig can do a lot of cool things :) if you switch to a trig formula, pretty sure it would not only update faster, but be even simpler,

  • @rybuds47
    @rybuds47 3 ปีที่แล้ว

    Love that little ship too you should do a ship showcase.

    • @Ravaen
      @Ravaen  3 ปีที่แล้ว +1

      For sure, I am planning to sell it eventually, just making sure it has everything it needs

  • @Engineergalaxy
    @Engineergalaxy 3 ปีที่แล้ว +2

    Hello, and tell me how to set it up so that my cradle rises to the bottom and to the top along the rangefinder, here you have only left and right

  • @TheWormkhalla
    @TheWormkhalla 2 ปีที่แล้ว

    Thanks for this video.

  • @lemusketeer3232
    @lemusketeer3232 3 ปีที่แล้ว

    You've earned my sub with this.. well done, well explained.. Thank you

  • @Eleriath
    @Eleriath 3 ปีที่แล้ว

    This is brilliant, Thank you very much for sharing this amazing info. Damn, thanks

  • @ArchaegeoNeosophy
    @ArchaegeoNeosophy 3 ปีที่แล้ว

    Nice clean and simple.

  • @spestlrosh
    @spestlrosh 2 ปีที่แล้ว

    Thx

  • @Locutus709
    @Locutus709 3 ปีที่แล้ว

    thx for cool Tutorial, will add to my ship, but change the rotation in pitch direction :)

  • @Shad0wswrath
    @Shad0wswrath 3 ปีที่แล้ว +1

    Lasers auto turn on with nothin in the beam... How can I fix that?

  • @kameleongreen
    @kameleongreen 3 ปีที่แล้ว

    Nice work, gonna add this to my ship!

  • @MG-ff7se
    @MG-ff7se 3 ปีที่แล้ว

    Any chance you can do a run down to a rotating / pivoting turrets yolol version of this, or does this code work without having to code in the rotation and pivots?

  • @GoldaniOmega
    @GoldaniOmega 3 ปีที่แล้ว

    Thank you! I will try this

  • @ellerimkirli9543
    @ellerimkirli9543 3 ปีที่แล้ว

    would be nice if you could show us button configs too :D

  • @verdmooring2695
    @verdmooring2695 3 ปีที่แล้ว +2

    This is not working for me. I do not see how this code will turn on my lasers when the range finder detects an object. :ML=22*:MINE-R? ML is binary, 0, 1. On or off. I don't get it.

    • @SensualSquirrel
      @SensualSquirrel 3 ปีที่แล้ว +1

      Yeah I don't understand it either. If the target range is 5, then 22*1-5 == 18. 22*0-5 == -5. Both of these turn the mining laser on. There's no way this code does what it shows.

  • @KoboldIV
    @KoboldIV 3 ปีที่แล้ว

    I'm having some difficulty setting this up.. but that might well be due to inexperience on my end..

    • @AlphaGuardianWolf
      @AlphaGuardianWolf 3 ปีที่แล้ว

      I'm having issues as well and I can't figure out why. Like 1 the lasers turn on even though nothing is in front of the range finder. And 2 they aren't turning to aim at the laser. Don't know if I'm using the wrong turret base or not for that bit. Also the * in the code is a lot bigger then it is in his for some reason. Idk how to make it as small as it is on his chip

  • @psychkick666
    @psychkick666 3 ปีที่แล้ว

    Thank u

  • @jack9951
    @jack9951 3 ปีที่แล้ว

    hi how can i add pulsed laser to your code? I've been trying for a long time but I can't get anything. Thank you.

  • @christianschirmer4356
    @christianschirmer4356 2 ปีที่แล้ว

    I found the code, the script works and the data is transmitted, but the turrets are not turning. What could that be?

  • @rybuds47
    @rybuds47 3 ปีที่แล้ว

    Bad ass!!

  • @matthewfortier1257
    @matthewfortier1257 3 ปีที่แล้ว

    Is there a way to make the lasers in this YOLO to pulse because my ship cant do 2 mining lasers more then a few seconds.

    • @Ravaen
      @Ravaen  3 ปีที่แล้ว

      Yes you can

    • @talmarfirestick5669
      @talmarfirestick5669 3 ปีที่แล้ว +1

      @@Ravaen I Think he was asking what that code would be. We all know you CAN do it, the question is HOW

  • @adenwilson304
    @adenwilson304 3 ปีที่แล้ว

    In SSC, my turret continues to rotate until they shoot themselves. What do I change to limit this? Max rotation??

    • @Ravaen
      @Ravaen  3 ปีที่แล้ว

      Troubleshoot and see what value RT and LT are

  • @KalisaFox
    @KalisaFox 3 ปีที่แล้ว

    would this work for an auto target autocannon setup for 2 front guns?

    • @Ravaen
      @Ravaen  3 ปีที่แล้ว +3

      In theory yes, but in practice no. The reason why is because the max range is 1 km, Isan only updates every 0.2 seconds, and on a moving target it will be inaccurate, but other than that it can be usefull

  • @CursedBukkit
    @CursedBukkit 3 ปีที่แล้ว +1

    My question is, how would one get this to work with Pitch on Turret Cradles too? - I'm bad with yolol

    • @sayex2023
      @sayex2023 3 ปีที่แล้ว +1

      I spent two days coding a yolol-script that aims 2-axis turrets regardless of their position and rotation from the rangefinder right at the rangefinders hit position. If you want the script I can give it to you.

    • @CursedBukkit
      @CursedBukkit 3 ปีที่แล้ว

      @@sayex2023 Oh, I'd massively appreciate that! It'd help me learn how to make my own yolols around turret manipulation.

    • @legroscompte1929
      @legroscompte1929 3 ปีที่แล้ว

      @@sayex2023 Did you succeed to do it without yolo pro chip (cost xhalium) and cos sin function ? can't figure how to do it

    • @Unxepted
      @Unxepted 3 ปีที่แล้ว

      ​@@sayex2023 I will be very appreciated, if you will share this one for all of us ))

    • @sayex2023
      @sayex2023 3 ปีที่แล้ว

      @@legroscompte1929 Yes, I did it on an advance chip. To avoid the trigonometric functions look up their polynomial approximation.

  • @wesleyraby9753
    @wesleyraby9753 3 ปีที่แล้ว

    Can we get the yolol code here in the comments, it's a little hard to see...

  • @christianschirmer4356
    @christianschirmer4356 2 ปีที่แล้ว

    Thx, but can anybody write down the script here? Can't read it properly because its 720P :/

  • @TheEmberEve
    @TheEmberEve 3 ปีที่แล้ว

    Where is code?

  • @TheShado20
    @TheShado20 3 ปีที่แล้ว

    complete waste of time, with this setup you only have 1 point in the entire range of the rangefinder that will work, mite as well jest set the lasers to a fixed cross position and forget the rangefinder and yolol chip. you NEED Professional yolol chips to do trig. the chip needs Xhalium is not in game at this moment.

    • @psychkick666
      @psychkick666 3 ปีที่แล้ว

      but mining laser range is very short

  • @SensualSquirrel
    @SensualSquirrel 3 ปีที่แล้ว

    Your code doesn't make any sense. :ML is the on/off toggle for the mining laser, where 0 is OFF and anything not 0 is ON. You could multiply it by a billion and not affect how it turns on or off. The only thing that does anything in this at all is the ratio divider for :RT being 90 / range.