# SScriptingEvents

## Index

### Functions Index

| Function Name                                      |
| -------------------------------------------------- |
| void [**InvokeEvent** ](#invokeevent)(string name) |

### Properties Index

| Property Name                                    |
| ------------------------------------------------ |
| bool [**Enabled** ](#enabled)`get` `set`         |
| string\[] [**Events** ](#events)`get`            |
| string [**ComponentName**](#componentname) `get` |
| SGameObject [**GameObject** ](#gameobject)`get`  |

## Functions

### InvokeEvent

void **InvokeEvent** (string name)

*Invoke the event with its name*

| Parameter | Type | Description |
| --------- | ---- | ----------- |
|           |      |             |

{% tabs %}
{% tab title="Lua" %}

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

{% endtab %}
{% endtabs %}

## Properties

### Enabled

bool **Enabled** `get` `set`

*Whether the scriptingEvents component is enabled or not*

{% tabs %}
{% tab title="Lua" %}

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

{% endtab %}
{% endtabs %}

### Events

string\[] **Events** `get`

*Returns a list of events*

{% tabs %}
{% tab title="Lua" %}

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

{% endtab %}
{% endtabs %}

### ComponentName

string **ComponentName** `get`

*The name of this component.*

{% tabs %}
{% tab title="Lua" %}

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

{% endtab %}
{% endtabs %}

### GameObject

[SGameObject](https://docs.sine.space/scripting/client-scripting-api-reference/types/sgameobject) **GameObject** `get`

*Property Description*

{% tabs %}
{% tab title="Lua" %}

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

{% endtab %}
{% endtabs %}
