# SParticle

**الأعضاء** 15

|       |                                         |                                          |
| ----- | --------------------------------------- | ---------------------------------------- |
| خاصية | [position](#position)                   | The position of the particle.            |
| خاصية | [velocity](#velocity)                   | The velocity of the particle.            |
| خاصية | [animatedVelocity](#animatedvelocity)   | The animated velocity of the particle.   |
| خاصية | [totalVelocity](#totalvelocity)         | The total velocity of the particle.      |
| خاصية | [remainingLifetime](#remaininglifetime) | The remaining lifetime of the particle.  |
| خاصية | [startLifetime](#startlifetime)         | The starting lifetime of the particle.   |
| خاصية | [startColor](#startcolor)               | The initial color of the particle.       |
| خاصية | [randomSeed](#randomseed)               | The random seed of the particle.         |
| خاصية | [axisOfRotation](#axisofrotation)       | Mesh particles rotate around this axis.  |
| خاصية | [startSize](#startsize)                 | The initial size of the particle.        |
| خاصية | [startSize3D](#startsize3d)             | The initial 3D size of the particle.     |
| خاصية | [rotation](#rotation)                   | The rotation of the particle.            |
| خاصية | [rotation3D](#rotation3d)               | The 3D rotation of the particle.         |
| خاصية | [angularVelocity](#angularvelocity)     | The angular velocity of the particle.    |
| خاصية | [angularVelocity3D](#angularvelocity3d) | The 3D angular velocity of the particle. |

## الخصائص

### position

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) position {get; set; }

The position of the particle.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 position = FirstParticle.position
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```

**Lua**

```lua
example 2

```

### velocity

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) velocity {get; set; }

The velocity of the particle.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 velocity= FirstParticle.velocity
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```

### animatedVelocity

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) animatedVelocity {get; }

The animated velocity of the particle.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 animatedVelocity= FirstParticle.animatedVelocity
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```

**Lua**

```lua
example 2

```

### totalVelocity

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) totalVelocity {get; }

The total velocity of the particle.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 totalVelocity= FirstParticle.totalVelocity
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```

### remainingLifetime

float remainingLifetime {get; set; }

The remaining lifetime of the particle.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 remainingLifetime= FirstParticle.remainingLifetime
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```

### startLifetime

float startLifetime {get; set; }

The starting lifetime of the particle.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 startLifetime= FirstParticle.startLifetime
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```

### startColor

[SColor](/docs/ar/scripting/client-scripting-api-reference/types/scolor.md) startColor {get; set; }

The initial color of the particle. The current color of the particle is calculated procedurally based on this value and the active color modules.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 startColor= FirstParticle.startColor
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```

### randomSeed

uint randomSeed {get; set; }

The random seed of the particle.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 randomSeed= FirstParticle.randomSeed
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```

### axisOfRotation

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) axisOfRotation {get; set; }

Mesh particles rotate around this axis.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 axisOfRotation= FirstParticle.axisOfRotation
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```

### startSize

float startSize {get; set; }

The initial size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 startSize= FirstParticle.startSize
 
end

this.OnParticleTrigger(OnParticleTrigger)

```

### startSize3D

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) startSize3D {get; set; }

The initial 3D size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 startSize3D= FirstParticle.startSize3D
 
end

this.OnParticleTrigger(OnParticleTrigger)

```

### rotation

float rotation {get; set; }

The rotation of the particle.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 rotation= FirstParticle.rotation
 
end

this.OnParticleTrigger(OnParticleTrigger)

```

### rotation3D

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) rotation3D {get; set; }

The 3D rotation of the particle.

مثال

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject) ParticlesArray = this.ParticleSystem.GetTriggerParticles(0) FirstParticle = ParticlesArray\[1] rotation3D= FirstParticle.rotation3D

end

this.SubscribeToEvents() this.OnParticleTrigger(OnParticleTrigger)

````text
</div>

</div>

<div data-gb-custom-block data-tag="tabs">

<div data-gb-custom-block data-tag="tab" data-title='Lua'>

```lua
example 2

````

### angularVelocity

float angularVelocity {get; set; }

The angular velocity of the particle.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 angularVelocity= FirstParticle.angularVelocity
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```

### angularVelocity3D

[SVector](/docs/ar/scripting/client-scripting-api-reference/types/svector.md) angularVelocity3D {get; set; }

The 3D angular velocity of the particle.

مثال

**Lua**

```lua
this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 angularVelocity3D= FirstParticle.angularVelocity3D
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)

```
