Security Camera System Tutorial And Touchscreen Tutorial | Stormworks Build and Rescue (lua coding)

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

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

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

    Question how do you make a toggle button?

  • @jahnringereide
    @jahnringereide 4 ปีที่แล้ว +1

    Jeez thank you, your wiremesh logic at the end was the final piece of the puzzle that has been my touch screen menu.

  • @neto135791
    @neto135791 4 ปีที่แล้ว +2

    you could use just one function "IsPoitingRectagle" and using diferent coordinates in the paramaters,
    instead of being
    1 = press and IsPoitingRectagle1(inputX, inputY, 15,43, 46, 20)
    output.setBool(1, a)
    2 = press and IsPoitingRectagle2(inputX, inputY, 15,20, 46, 20)
    output.setBool(2, b)
    3 = press and IsPoitingRectagle3(inputX, inputY, 65,43, 46, 20)
    output.setBool(3, c)
    4= press and IsPoitingRectagle4(inputX, inputY, 74,64, 12, 10)
    output.setBool(4, d)
    function IsPoitingRectagle1(x, y, rectX, rectY, rectW, rectH)
    return x > rectX and y > rectY and x < rectX+rectW and y < rectY+rectH
    end
    function IsPoitingRectagle2(x, y, rectX, rectY, rectW, rectH)
    return x > rectX and y > rectY and x < rectX+rectW and y < rectY+rectH
    end
    function IsPoitingRectagle3(x, y, rectX, rectY, rectW, rectH)
    return x > rectX and y > rectY and x < rectX+rectW and y < rectY+rectH
    end
    function IsPoitingRectagle4(x, y, rectX, rectY, rectW, rectH)
    return x > rectX and y > rectY and x < rectX+rectW and y < rectY+rectH
    end
    its just
    1 = press and IsPoitingRectagle(inputX, inputY, 15,43, 46, 20)
    output.setBool(1, a)
    2 = press and IsPoitingRectagle(inputX, inputY, 15,20, 46, 20)
    output.setBool(2, b)
    3 = press and IsPoitingRectagle(inputX, inputY, 65,43, 46, 20)
    output.setBool(3, c)
    4= press and IsPoitingRectagle(inputX, inputY, 74,64, 12, 10)
    output.setBool(4, d)
    function IsPoitingRectagle(x, y, rectX, rectY, rectW, rectH)
    return x > rectX and y > rectY and x < rectX+rectW and y < rectY+rectH
    end
    it wil work in the same way and is take less space.
    your tutorial still great

    • @StormRunnerGaming
      @StormRunnerGaming  4 ปีที่แล้ว

      thanks, It is always cool to get another way to do something that improves on the previous version!

    • @neto135791
      @neto135791 4 ปีที่แล้ว

      @@StormRunnerGaming thats true. i just finished this ship and i used a more extensive use of functions instead of being everything the drawn function. give it a look. i think it make easier to undertand codes with this. steamcommunity.com/sharedfiles/filedetails/?id=2109289092

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

    Can't lose me at logic. You should see some of these circuits. Made so many things. 1 controller takes of the entire microcontroller. That draws to a 28 channel 7 segment system another 4 7 segments set to on/off to spell words out. Switches between speed, alt, battery, rps. for the pilot. Same thing for co pilot with independent controll. Then some warnings, if the step is open, will take over and say step while beeping. Some engine temp warnings, showing their temps on the 4, 7 segments. And a bunch of other switching, triggers, and failsafes and function logic.
    Took me 6 hours to do it. Normally I can grind out a complete switching system or controller in 10 minutes.
    Realized it may be more effcient to use lua. But I know absolutely nothing of it. Really want to attempt to learn

    • @maple3953
      @maple3953 4 ปีที่แล้ว

      Make a code lock with Lua

  • @oliboli3493
    @oliboli3493 4 ปีที่แล้ว +1

    Hi, can you possibly tell me how to make it so when you let go of a button it stays on the camera. Please.

    • @StormRunnerGaming
      @StormRunnerGaming  4 ปีที่แล้ว +1

      I used all that logic with the jk flip flops to create a button that would stay on each screen (from each camera). That part of the videos starts around 12:30. I don't actually show how I built it, but only the finished product. If you are still interested, you can pause the video there and make a similar system for whatever camera system you are using. Hope this helps

    • @oliboli3493
      @oliboli3493 4 ปีที่แล้ว

      Hi thanks so much. It will help me a ton.

  • @Daniel20030
    @Daniel20030 4 ปีที่แล้ว +1

    Why is literally every single TH-camr getting this wrong? You create a function for one reason, and that reason is so you don't have to write that block of code for each time you're going to use it. You can call the same function as many times as you want, and it will return the right value. Please, please, don't just copy paste the function. Speech of the day lmao ;)

    • @StormRunnerGaming
      @StormRunnerGaming  4 ปีที่แล้ว +1

      Yeah, I now realize how useful that type of code can be. I am only just learning to code in school ( and still have a bit to learn )

  • @skipydog5675
    @skipydog5675 5 ปีที่แล้ว +1

    How to stop OB from pressing all of the buttons that are bad to press... lol. Also cosmoteer has multiplayer creative so now you can do stuff with your fans!

    • @StormRunnerGaming
      @StormRunnerGaming  5 ปีที่แล้ว

      huh, I need to jump back into some more cosmoteer

  • @stephenwav
    @stephenwav 4 ปีที่แล้ว +2

    im literally searching the whole Internet for a way to convert the Standard push button to a toggle button...

    • @StormRunnerGaming
      @StormRunnerGaming  4 ปีที่แล้ว

      I believe there is a new logic block/piece that can switch a button to a toggle. I'll have to check the get to make sure though

  • @sashablank3532
    @sashablank3532 5 ปีที่แล้ว +2

    🤔 SECURITYY

  • @superknightlol
    @superknightlol 4 ปีที่แล้ว +1

    you have way detailed tutorial than mrnjersey

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

    ....you don’t need to replicate the isPointInRectangle function....

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

      Interesting, I'll have to try that out for the future. Thanks for the tip

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

      @@StormRunnerGaming yeah is the whole point of a function, so you don’t have to repeat a common set of code (I don’t do much lua but I am a programmer)

  • @ГлібШульга-х1ш
    @ГлібШульга-х1ш 5 ปีที่แล้ว +1

    OH CRAP