Gyro
Stabilizes vehicles and structures by pointing upwards. Useful for mechs or orientating structures to the correct rotation. Has a maximum range of 75000 studss. The gyro can also be configured to seek objects and players.
When powered, the gyro will follow its seek commands that can be configured using hammer. The gyro has commands that allow it to find and seek objects and players.
An example of gyro's seek configuration includes "Player1 Player2" which will seek and aim towards the nearest player.
Putting "Radar" at the beginning of the seek configuration will make it target parts instead. For example, "Radar Gold Copper" will find the nearest Gold or Copper deposit.
Putting "AllExcept" will make the seeker target everything except the given list, basically inverting it. For example, "AllExcept Player1 Player2" will target "Player3" or "Player"4 but not "Player1".
The commands "Min" and "Max" set the minimum or maximum distance the seeker will target. For example, "Min20 Max500" will make the seeker only target objects within 500 studs and more than 20 studs away.
TriggerWhenSeeked will trigger all connected parts every second when the Seek configurable is satisfied
"TrigMin" and "TrigMax" work the same as "Min" and "Max" but it's for the trigger signal, trigger signal will only be sent if the above property is true.
ExceptOwnedBy accepts a list with no spaces, targeting parts that are NOT owned by the people in the supplied list.
Putting "Sun" as part of the list will make the seeker automatically target the main stellar body in the system.
Gyros also have a property called MaxTorque. This allows you to control the max force on the gyro to stabilize it.
It is a craftable and spawnable non-flammable solid.
It cannot be resized.
At its default size (2x1x2) it has a durability of 8.
By default, its colour is #635f62.
It requires 8 Iron
and 4 Wire
to be crafted.
Methods
PointAlong(direction, up)
Points the gyro along the specified vector. Pass nil
or configure the gyro to stop pointing.
The parameters for PointAlong
are as follows:
- The direction parameter is the vector for the gyro to point along. It is a
Vector3
. - The up parameter is the
UpVector
of the gyro with a default of(0, 1, 0)
. It is aVector3
. It can also benil
.
PointAt(position, up)
Points the gyro towards the specified position. Pass nil
or configure the gyro to stop pointing.
The parameters for PointAt
are as follows:
- The position parameter is the position for the gyro to look at. It is a
Vector3
. - The up parameter is the
UpVector
of the gyro with a default of(0, 1, 0)
. It is aVector3
. It can also benil
.
Configurables
DisableWhenUnpowered
Determines whether this gyro should be disabled while it does not have power. It is a boolean
.
MaxTorque
The maximum force in each axis the gyro can exert. It is a number
.
It ranges between 0 and 10000000000.
Seek
The seek commands. It is a string
.
TriggerWhenSeeked
Determines whether to send out a trigger signal when the gyro detects something to seek as determined by the Seek configurable. It is a boolean
.
Events
Configured(configurerId)
Fires when the object is configured.
The configurerId parameter is the UserId
of the player who configured the object. It is a number
.
Loop(deltaTime)
Fires when the object is updated by the game loop.
The deltaTime parameter is the 'time' since the last tick, it does not represent the actual time since the last tick was occurred, rather just how often a game tick should be fired (it will always be precisely 1
). It is a number
.