Jump to content

1 Screenshot

  • 38.6k
  • 462
  • 50.87 kB

About Buoyant Helicopters

Allows helicopters to float in water.

Features

  • Allows Minicopters, Scrap Transport Helicopters, and Attack Helicopters to float in water
  • Optionally requires vehicle owner or pilot permission for vehicles to be buoyant
  • Configurable number, position and rotation of optional decorative inner tubes
  • Configurable number, position, size and force of buoyancy points
  • Configurable underwater drag for when crashing through the water's surface
  • API and hooks allow for more powerful integrations

How it works

By default, all Minicopters, Scrap Transport Helicopters, and Attack Helicopters will be buoyant, with decorative inner tubes. The inner tubes are indestructible and cannot be picked up.

When flying at low to moderate velocity, you can simply land on water and dismount.

When flying at high velocity, you may crash through the water's surface, causing the engine to shut off. The vehicle will then slowly rise to the water's surface. You may run out of oxygen if you choose to stay in the vehicle while waiting for it to surface.

While piloting a helicopter on the water's surface, you cannot drive it like on ground, but you can turn it in place by holding the down key and pressing left or right.

While the decorative inner tubes are configured to be dynamic, they will appear shortly after touching water, and they will disappear a few seconds after leaving water.

Permissions

This plugin uses the permission system. To assign a permission, use oxide.grant <user or group> <name or steam id> <permission>. To remove a permission, use oxide.revoke <user or group> <name or steam id> <permission>.

Optionally, you may require that either the vehicle owner or most recent pilot have permission, in order for the vehicle to be buoyant. To do so, set "Require permission": true for the corresponding vehicle type in the configuration.

  • buoyanthelicopters.owner.minicopter -- Minicopters will be buoyant if owned by a player with this permission.
  • buoyanthelicopters.pilot.minicopter -- Minicopters will be buoyant if the current (or most recent pilot, if no current pilot) has this permission.
  • buoyanthelicopters.owner.scraptransport -- Scrap Transport Helicopters will be buoyant if owned by a player with this permission.
  • buoyanthelicopters.pilot.scraptransport -- Scrap Transport Helicopters will be buoyant if the current (or most recent pilot, if no current pilot) has this permission.
  • buoyanthelicopters.owner.attackhelicopter -- Attack Helicopters will be buoyant if owned by a player with this permission.
  • buoyanthelicopters.pilot.attackhelicopter -- Attack Helicopters will be buoyant if the current (or most recent pilot, if no current pilot) has this permission.

Note: If you want to use ownership-based permission, you must be aware that helicopters do not have ownership in vanilla Rust, so for it to work, you must install a plugin which grants vehicle ownership. For example, Vehicle Vendor Options, Claim Vehicle, Vehicle Deployed Locks, Spawn Mini, and Vehicle License all have features which relate to vehicle ownership. If you don't want to deal with vehicle ownership, you can use the pilot-based permissions instead.

Configuration

The settings and options can be configured in the BuoyantHelicopters file under the config directory. The use of an editor and validator is recommended to avoid formatting issues and syntax errors.

  • Admin debug (true or false) -- Determines whether debug info is shown to nearby admins when a helicopter becomes buoyant. This helps with configuring the buoyancy points. Default: false.

The Minicopter, Scrap Transport Helicopter, and Attack Helicopter sections have the following options.

  • Enabled (true or false) -- Determines whether the vehicle type supports buoyancy. Default: true.
  • Require permission (true or false) -- Determines whether the vehicle type requires the vehicle owner or most recent pilot to have permission in order for the vehicle to be buoyant. Default: false.
    • Note: Helicopters do not have ownership in vanilla Rust. If you enable this option, you must install and configure another plugin which grants vehicle ownership.
  • Underwater drag -- Determines how much drag buoyant vehicles have while underwater. Raising this will reduce the speed at which vehicles sink and rise. If you change this value, you will probably also need to adjust the force of each buoyancy point. Default: 2.
  • Buoyancy points -- List of buoyancy points.
    • Position -- Determines the position of the buoyancy point, relative to the vehicle origin.
    • Size -- Determines the size of the buoyancy point. Default: 2.
    • Force -- Determines how much force is applied at the buoyancy point.
    • Decoration
      • Enabled (true or false) -- Determines whether the buoyancy point has a decorative inner tube.
      • Dynamic (true or false) -- Determines whether the decorative inner tube will be displayed only when touching water (and a short time after touching water).
      • Position -- Determines the position of the decorative inner tube, relative to the vehicle origin.
      • Prefab -- Determines the prefab of the decorative inner tube. Default: assets/prefabs/misc/summer_dlc/inner_tube/innertube.deployed.prefab.
      • Rotation angles -- Determines the rotation of the decorative inner tube.

Developer API

API_IsBuoyant

bool API_IsBuoyant(BaseEntity heli)

Returns true if the helicopter is buoyant, else returns false.

API_AddBuoyancy

void API_AddBuoyancy(BaseEntity heli)

Makes the helicopter buoyant if it's not already.

API_RemoveBuoyancy

void API_RemoveBuoyancy(BaseEntity heli)

Makes the helicopter not buoyant.

Developer Hooks

OnVehicleBuoyancyAdd

object OnVehicleBuoyancyAdd(BaseEntity heli)

Called when buoyancy is about to be added to a helicopter. Return false to cancel.

OnVehicleBuoyancyAdded

void OnVehicleBuoyancyAdded(BaseEntity heli)

Called after buoyancy has been added to a helicopter.

OnVehicleBuoyancyRemoved

void OnVehicleBuoyancyRemoved(BaseEntity heli)

Called after buoyancy has been removed from a helicopter.

  • Like 1
  • Love 1

User Feedback

1.1m

Downloads

Total number of downloads.

5.6k

Customers

Total customers served.

80.8k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.