# SScriptingEvents

**الأعضاء** 5

|       |                                 |                                                         |
| ----- | ------------------------------- | ------------------------------------------------------- |
| دالة  | [InvokeEvent](#invokeevent)     | Invoke the event with its name                          |
| خاصية | [Enabled](#enabled)             | Whether the scriptingEvents component is enabled or not |
| خاصية | [Events](#events)               | Returns a list of events                                |
| خاصية | [ComponentName](#componentname) | The name of this component.                             |
| خاصية | [GameObject](#gameobject)       | –                                                       |

## الدوال

### InvokeEvent

void InvokeEvent(string name)

Invoke the event with its name

المعاملات

| الاسم | النوع  | القيمة الافتراضية |
| ----- | ------ | ----------------- |
| name  | string | –                 |

القيم المرجعة

`void`

مثال

**Lua**

```lua
Space.Host.ExecutingObject.Events.InvokeEvent("EventName")

```

## الخصائص

### Enabled

bool Enabled {get; set; }

Whether the scriptingEvents component is enabled or not

مثال

**Lua**

```lua
Space.Host.ExecutingObject.Events.Enabled = true

```

### Events

string\[] Events {get; }

Returns a list of events

مثال

**Lua**

```lua
eventNames = Space.Host.ExecutingObject.Events.Events

```

### ComponentName

string ComponentName {get; }

The name of this component.

مثال

**Lua**

```lua
componentName = Space.Host.ExecutingObject.Events.ComponentName

```

### GameObject

[SGameObject](/docs/ar/scripting/client-scripting-api-reference/types/sgameobject.md) GameObject {get; }

مثال

**Lua**

```lua
theGameObject = Space.Host.ExecutingObject.Events.GameObject

```
