# SScriptingEvents

**Membres** 5

|           |                                 |                                                         |
| --------- | ------------------------------- | ------------------------------------------------------- |
| Fonction  | [InvokeEvent](#invokeevent)     | Invoke the event with its name                          |
| Propriété | [Enabled](#enabled)             | Whether the scriptingEvents component is enabled or not |
| Propriété | [Events](#events)               | Returns a list of events                                |
| Propriété | [ComponentName](#componentname) | The name of this component.                             |
| Propriété | [GameObject](#gameobject)       | –                                                       |

## Fonctions

### InvokeEvent

void InvokeEvent(string name)

Invoke the event with its name

Paramètres

| Nom  | Type   | Valeur par défaut |
| ---- | ------ | ----------------- |
| name | string | –                 |

Valeurs de retour

`void`

Exemple

**Lua**

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

```

## Propriétés

### Enabled

bool Enabled {get; set; }

Whether the scriptingEvents component is enabled or not

Exemple

**Lua**

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

```

### Events

string\[] Events {get; }

Returns a list of events

Exemple

**Lua**

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

```

### ComponentName

string ComponentName {get; }

The name of this component.

Exemple

**Lua**

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

```

### GameObject

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

Exemple

**Lua**

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

```
