Starbase Tutorial: Setting up Smart Mining Lasers

Поділитися
Вставка
  • Опубліковано 21 гру 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.

  • @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

  • @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).

  • @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

  • @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 ua-cam.com/video/szokSSDdctE/v-deo.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

  • @Shad0wswrath
    @Shad0wswrath 3 роки тому +1

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

  • @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,

  • @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.. 👍👍👍👍👍👐👍👍💯

  • @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.

  • @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?

  • @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

  • @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?

  • @Locutus709
    @Locutus709 3 роки тому

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

  • @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.

  • @Eleriath
    @Eleriath 3 роки тому

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

  • @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

  • @TheWormkhalla
    @TheWormkhalla 2 роки тому

    Thanks for this video.

  • @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.

  • @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

  • @christianschirmer4356
    @christianschirmer4356 2 роки тому

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

  • @wesleyraby9753
    @wesleyraby9753 3 роки тому

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

  • @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

  • @lemusketeer3232
    @lemusketeer3232 3 роки тому

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

  • @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

  • @kameleongreen
    @kameleongreen 3 роки тому

    Nice work, gonna add this to my ship!

  • @ArchaegeoNeosophy
    @ArchaegeoNeosophy 3 роки тому

    Nice clean and simple.

  • @ellerimkirli9543
    @ellerimkirli9543 3 роки тому

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

  • @GoldaniOmega
    @GoldaniOmega 3 роки тому

    Thank you! I will try this

  • @TheEmberEve
    @TheEmberEve 3 роки тому

    Where is code?

  • @spestlrosh
    @spestlrosh 2 роки тому

    Thx

  • @psychkick666
    @psychkick666 3 роки тому

    Thank u

  • @rybuds47
    @rybuds47 3 роки тому

    Bad ass!!

  • @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.