Show / Hide Table of Contents

Class WorldObject

World object element World objects are physical representations of any object in the world.

Inheritance
object
Element
WorldObject
WeaponObject
Inherited Members
Element.Parent
Element.Children
Element.Associations
Element.AssociatedPlayers
Element.Id
Element.TimeContext
Element.Name
Element.position
Element.Position
Element.Right
Element.Up
Element.Forward
Element.rotation
Element.Rotation
Element.velocity
Element.Velocity
Element.turnVelocity
Element.TurnVelocity
Element.interior
Element.Interior
Element.dimension
Element.Dimension
Element.alpha
Element.Alpha
Element.areCollisionsEnabled
Element.AreCollisionsEnabled
Element.isCallPropagationEnabled
Element.IsCallPropagationEnabled
Element.isFrozen
Element.IsFrozen
Element.UpdateContext
Element.IsSync
Element.Subscribers
Element.ElementDataSubscriptions
Element.BroadcastableElementData
Element.Attachment
Element.AttachedElements
Element.IsDestroyed
Element.IsVisibleToEveryone
Element.AddSubscriber(Player)
Element.RemoveSubscriber(Player)
Element.GetAndIncrementTimeContext()
Element.CanUpdateSync(byte)
Element.Destroy()
Element.RunWithContext(Action, ElementUpdateContext)
Element.RunWithContext(Func<Task>, ElementUpdateContext)
Element.RunAsSync(Action, bool)
Element.RunAsSync(Func<Task>, bool)
Element.RemoveFrom(MtaServer)
Element.AssociateWith(Player)
Element.RemoveFrom(Player)
Element.UpdateAssociatedPlayers()
Element.AddChild(Element)
Element.RemoveChild(Element)
Element.IsChildOf(Element)
Element.SetData(string, LuaValue, DataSyncType)
Element.GetData(string, bool)
Element.SubscribeToData(Player, string)
Element.UnsubscribeFromData(Player, string)
Element.UnsubscribeFromAllData(Player)
Element.IsPlayerSubscribedToData(Player, string)
Element.GetPlayersSubcribedToData(string)
Element.AttachTo(Element, Vector3?, Vector3?)
Element.DetachFrom(Element)
Element.CreateFor(IEnumerable<Player>)
Element.CreateFor(Player)
Element.DestroyFor(IEnumerable<Player>)
Element.DestroyFor(Player)
Element.PositionChanged
Element.RotationChanged
Element.VelocityChanged
Element.TurnVelocityChanged
Element.InteriorChanged
Element.DimensionChanged
Element.AlphaChanged
Element.NameChanged
Element.CallPropagationChanged
Element.CollisionEnabledChanged
Element.FrozenChanged
Element.IdChanged
Element.AssociatedWith
Element.RemovedFrom
Element.DataChanged
Element.Attached
Element.Detached
Element.AttachedOffsetChanged
Element.Destroyed
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SlipeServer.Server.Elements
Assembly: SlipeServer.Server.dll
Syntax
public class WorldObject : Element

Constructors

| Edit this page View Source

WorldObject(ObjectModel, Vector3)

Declaration
public WorldObject(ObjectModel model, Vector3 position)
Parameters
Type Name Description
ObjectModel model
Vector3 position
| Edit this page View Source

WorldObject(ushort, Vector3)

Declaration
public WorldObject(ushort model, Vector3 position)
Parameters
Type Name Description
ushort model
Vector3 position

Fields

| Edit this page View Source

model

Declaration
protected ushort model
Field Value
Type Description
ushort
| Edit this page View Source

scale

Declaration
protected Vector3 scale
Field Value
Type Description
Vector3

Properties

| Edit this page View Source

ApproximatedMidMovementPosition

Declaration
public Vector3 ApproximatedMidMovementPosition { get; }
Property Value
Type Description
Vector3
| Edit this page View Source

ApproximatedMidMovementRotation

Declaration
public Vector3 ApproximatedMidMovementRotation { get; }
Property Value
Type Description
Vector3
| Edit this page View Source

DoubleSided

Declaration
public bool DoubleSided { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

ElementType

The element type as per MTA's specifications. Multiple C# types can share the same MTA element type.

Declaration
public override ElementType ElementType { get; }
Property Value
Type Description
ElementType
Overrides
Element.ElementType
| Edit this page View Source

Health

Declaration
public float Health { get; set; }
Property Value
Type Description
float
| Edit this page View Source

IsBreakable

Declaration
public bool IsBreakable { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

IsLowLod

Declaration
public bool IsLowLod { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

IsVisibleInAllDimensions

Declaration
public bool IsVisibleInAllDimensions { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

LowLodElement

Declaration
public WorldObject? LowLodElement { get; set; }
Property Value
Type Description
WorldObject
| Edit this page View Source

Model

Declaration
public ushort Model { get; set; }
Property Value
Type Description
ushort
| Edit this page View Source

Movement

Declaration
public PositionRotationAnimation? Movement { get; }
Property Value
Type Description
PositionRotationAnimation
| Edit this page View Source

Scale

Declaration
public Vector3 Scale { get; set; }
Property Value
Type Description
Vector3

Methods

| Edit this page View Source

AssociateWith(MtaServer)

Declaration
public WorldObject AssociateWith(MtaServer server)
Parameters
Type Name Description
MtaServer server
Returns
Type Description
WorldObject
| Edit this page View Source

CancelMovement(bool)

Declaration
public void CancelMovement(bool resetPosition = false)
Parameters
Type Name Description
bool resetPosition
| Edit this page View Source

Move(Vector3, Vector3, TimeSpan)

Declaration
public Task Move(Vector3 newPosition, Vector3 deltaRotation, TimeSpan moveTime)
Parameters
Type Name Description
Vector3 newPosition
Vector3 deltaRotation
TimeSpan moveTime
Returns
Type Description
Task

Events

| Edit this page View Source

IsVisibleInAllDimensionsChanged

Declaration
public event ElementChangedEventHandler<WorldObject, bool>? IsVisibleInAllDimensionsChanged
Event Type
Type Description
ElementChangedEventHandler<WorldObject, bool>
| Edit this page View Source

ModelChanged

Declaration
public event ElementChangedEventHandler<WorldObject, ushort>? ModelChanged
Event Type
Type Description
ElementChangedEventHandler<WorldObject, ushort>
| Edit this page View Source

Moved

Declaration
public event ElementEventHandler<WorldObject, WorldObjectMovedEventArgs>? Moved
Event Type
Type Description
ElementEventHandler<WorldObject, WorldObjectMovedEventArgs>
| Edit this page View Source

MovementCancelled

Declaration
public event ElementEventHandler<WorldObject, WorldObjectMovementCancelledEventArgs>? MovementCancelled
Event Type
Type Description
ElementEventHandler<WorldObject, WorldObjectMovementCancelledEventArgs>
| Edit this page View Source

ScaleChanged

Declaration
public event ElementChangedEventHandler<WorldObject, Vector3>? ScaleChanged
Event Type
Type Description
ElementChangedEventHandler<WorldObject, Vector3>

Extension Methods

ElementPropertyRelayingExtensions.AddRelayers(Element)
ElementPropertyRelayingExtensions.RelayChange(Element, Packet)
WorldObjectPropertyRelayingExtensions.AddWorldObjectRelayers(WorldObject)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX