996
edits
(Moving "Forgot to bring rubber?" to tips & tricks as it doesn't fit in as neatly with the rest of the wiki) |
m (Changed protection settings for "Tips & Tricks": Changing how protection is handled so a warning isn't displayed to editors that only admins can edit the page when in reality that isn't the case at all. ([Edit=Allow only logged in users] (indefinite) [Move=Allow only logged in users] (indefinite))) |
||
(One intermediate revision by one other user not shown) | |||
Line 88:
Clicking on a planet on your [[StarMap|star map]] allows you to automatically configure the coordinates of a [[telescope]] or [[HyperDrive|hyperdrive]] to said planet, which is much easier and faster than typing it manually.
===
If you find yourself in a situation such as having your ship warp without you, do not worry. Go back to your base using a [[CloningBay|cloning bay]]. Then get a [[Teleporter|teleporter]] and configure it with the coordinate your ship just warped to. There is a good chance that once you teleport, you will hear a hyperdrive sound and you will spawn inside your ship.
===Wireless Ethernet in Stable===
If you know anything about [[Microcontroller|microcontrollers]] you likely know that [[EthernetCable|Ethernet cables]] can be used to extend ports. However, there's a way to do this ''wirelessly'' without the need to use Ethernet cables. You will need the following materials: 2 [[Microcontroller|microcontrollers]], 2 [[Port|ports]], and 2 [[Antenna|antennae]].<br>
====The setup====
The setup is pretty simple. 2 microcontrollers with 2 ports, each attached to an antenna. An illustration is provided below: (unless your browser doesn't support images)
[[File:Wireless ethernet.svg|thumb|alt=2 separate microcontrollers, each with a port attached on top and an antenna.|Setup for wireless Ethernet.]]
====The code====
The code is also pretty simple:
Code for the "sending" microcontroller (just 1 line!)
<syntaxhighlight lang="lua" line="1">
TriggerPort(1)
</syntaxhighlight>
Code for the "receiving" microcontroller
<syntaxhighlight lang="lua" line="1">
GetPort(1):Connect("Triggered",function (port)
-- Your code here
end)
</syntaxhighlight>
From there, you can do things like this:
<syntaxhighlight lang="lua" line="1">
GetPort(1):Connect("Triggered",function (port)
local Screen = GetPartFromPort(port,"Screen")
Screen:ClearElements()
Screen:CreateElement("TextLabel",{
Size = UDim2.fromScale(1,1);
Text = "Wireless ports!!"
})
end)
</syntaxhighlight>
{{DEFAULTSORT:Tips & Tricks}}
|