Junkyard Crane (drive anywhere)

Wasn't there a plugin that did this at one time?

Not sure, but one way this can probably be accomplished is by setting the maxDistanceFromOrigin property to a large number (e.g., float.MaxValue). Here's an example that you could drop into a plugin, which would apply to any magnet crane that spawns after the plugin loads.

void OnEntitySpawned(MagnetCrane magnetCrane)
{
    magnetCrane.maxDistanceFromOrigin = float.MaxValue;
}

Not really a scripter.  I can just open any plugin and create a space between some lines and drop it in?

Yeah, pretty much, but here's a full version. Save as DriveMagnetCranesAnywhere.cs.

namespace Oxide.Plugins
{
    [Info("Drive Magnet Cranes Anywhere", "WhiteThunder", "1.0.0")]
    [Description("Allows Magnet Cranes to be driven anywhere.")]
    public class DriveMagnetCranesAnywhere : CovalencePlugin
    {
        private void OnServerInitialized()
        {
            foreach (var entity in BaseNetworkable.serverEntities)
            {
                var magnetCrane = entity as MagnetCrane;
                if (magnetCrane != null)
                {
                    OnEntitySpawned(magnetCrane);                    
                }
            }
        }

        private void OnEntitySpawned(MagnetCrane magnetCrane)
        {
            magnetCrane.maxDistanceFromOrigin = float.MaxValue;
        }
    }
}

correct, the .cs file.. but i'm curious if that plugin you choose already has

OnEntitySpawned​
does it matter?

It can matter, particularly if the existing OnEntitySpawned hook uses a broad type such as BaseEntity or BaseVehicle which encompasses MagnetCrane, then you might see an issue.

Any way you can whip up a quick copy/paste code to make the crane able to pick up anything metal, like minicopters, barrels, etc?

dravenmeex

Any way you can whip up a quick copy/paste code to make the crane able to pick up anything metal, like minicopters, barrels, etc?

There are some old threads about it when the magnet crane came out.

https://umod.org/community/rust/33846-how-to-make-more-items-magneticshredable-hdrp

Basically the entity needs a MagnetLiftable component, and needs to be on select collision layers. Not sure how well things like barrels will work since they aren't designed to be moved around (they don't have a physics rigid body).

NKXTQs24ExGTuL8.jpg WhiteThunder

There are some old threads about it when the magnet crane came out.

https://umod.org/community/rust/33846-how-to-make-more-items-magneticshredable-hdrp

Basically the entity needs a MagnetLiftable component, and needs to be on select collision layers. Not sure how well things like barrels will work since they aren't designed to be moved around (they don't have a physics rigid body).

That would be great... if I were a coder.  lol

Guess I'll just wait until someone makes a plugin for it.