# SScriptingEvents

**Members** 5

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

## Functions

### InvokeEvent

void InvokeEvent(string name)

Invoke the event with its name

Parameters

| Name | Type   | Default |
| ---- | ------ | ------- |
| name | string | –       |

Returns

`void`

Example

**Lua**

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

```

## Properties

### Enabled

bool Enabled {get; set; }

Whether the scriptingEvents component is enabled or not

Example

**Lua**

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

```

### Events

string\[] Events {get; }

Returns a list of events

Example

**Lua**

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

```

### ComponentName

string ComponentName {get; }

The name of this component.

Example

**Lua**

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

```

### GameObject

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

Example

**Lua**

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

```
