construct.Magnet

From Garry's Mod
Jump to: navigation, search
 construct.Magnet( )

Contents

Description

Creates a magnet.

Arguments

Player ply

Player that will have the numpad control over the magnet

Arguments

Vector pos

The position of the magnet

Arguments

Angle ang

The angles of the magnet

Arguments

string model

The model of the maget

Arguments

string material

Material of the magnet ( texture )

Arguments

number key

The key to toggle the magnet, see KEY_ Enums

Arguments

number maxObjects

Maximum amount of objects the magnet can hold

Arguments

number strength

Strength of the magnet

Arguments

number nopull=0

If > 0, disallows the magnet to pull objects towards it

Arguments

number allowrot=0

If > 0, allows rotation of the objects attached

Arguments

number startOn=0

If > 0, enabled from spawn

Arguments

number toggle

If != 0, pressing the key toggles the magnet, otherwise you'll have to hold the key to keep it enabled

Arguments

Vector vel=Vector( 0, 0, 0 )

Velocity to set on spawn

Arguments

Angle aVel=Angle( 0, 0, 0 )

Angular velocity to set on spawn

Arguments

boolean frozen=false

Freeze the magnet on start

Returns

Entity

The magnet
Personal tools
Navigation