Ground (functions)/Entities
This page documents the ScriptGround class for Lua scripting.
As a singleton class, it can be accessed from Lua with GROUND.
Hide
GROUND:Hide(entityname)
Hides an entity.
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The name of the entity to hide. |
Unhide
GROUND:Unhide(entityname)
Unhides an entity.
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The name of the entity to unhide. |
RemoveObject
GROUND:RemoveObject(instancename)
Deletes an object from the ground map, identified by its instance name.
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The instance name of the object. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if succeeded, false otherwise. |
RemoveCharacter
GROUND:RemoveCharacter(instancename)
Deletes a character from the ground map, identified by its instance name.
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The instance name of the object. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if succeeded, false otherwise. |
CreateCharacterFromCharData
GROUND:CreateCharacterFromCharData(instancename, data, x, y, direction)
Creates a ground character, given a dungeon character.
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The instance name to give the character |
| RogueEssence.Dungeon.Character | RogueEssence.Dungeon.Character | Character data to create from |
| System.Int32 | System.Int32 | X coordinate of the character |
| System.Int32 | System.Int32 | Y coordinate of the character |
| RogueElements.Dir8 | RogueElements.Dir8 | Direction the character will face, defaults to Dir8.Down |
Returns
| Type | Description |
|---|---|
| RogueEssence.Ground.GroundChar |
RefreshPlayer
GROUND:RefreshPlayer()
Reloads the controllable player's character data to be the current team's leader.
SetPlayer
GROUND:SetPlayer(charData)
Sets the controllable player to use new character data.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Dungeon.CharData | RogueEssence.Dungeon.CharData | The new character data |
SpawnerDoSpawn
GROUND:SpawnerDoSpawn(spawnername)
Make the specified spawner run its spawn method.
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String |
Returns
| Type | Description |
|---|---|
| RogueEssence.Ground.GroundChar | The ground character spawned. |
SpawnerSetSpawn
GROUND:SpawnerSetSpawn(spawnername, spawnChar)
Sets the character to the specified spawner
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The spawner to set the character to, by name |
| RogueEssence.Dungeon.CharData | RogueEssence.Dungeon.CharData | The character to spawn. |
References
https://github.com/RogueCollab/RogueEssence/blob/master/RogueEssence/Lua/ScriptGroundEntities.cs
