Scripting Reference
You are reading the Lua scripting reference manual for Legend of Grimrock. The focus of this document is on completeness rather than brevity. Refer to the tutorials for more detailed examples on how to use the material described here.
The Lua functions and methods described here can be accessed from a script entity and typed on the console.
In addition the following standard Lua functions can be used: tonumber, tostring, type, pairs, ipairs, and all functions in table, math and string modules. See the Lua reference manual for more details about their usage.
Accessing Entities
Almost all things in Legend of Grimrock are modeled as objects. There are two types of objects. Entities are game objects which are spawned in the dungeon either by placing them in the dungeon using the level editor or spawning them dynamically from a script. For example buttons, pressure plates, teleporters and the party are all entities. Each entity has an id, a string which identifies the entity uniquely. You can refer to an entity by simply typing it’s id. For example, the following script calls the rest() method on an entity with the id “party”:
party:rest()
All entities have the following properties that can be accessed with the dot operator:
- “name” returns the name of the entity
- “id” returns the unique identifier of the entity
- “x” returns the x-coordinate of the entity on the map
- “y” returns the y-coordinate of the entity on the map
- “facing” returns the facing of the entity (0=north, 1=east, 2=south, 3=west)
- “level” returns the dungeon level index of the entity
- “class” returns the class name of the entity
For example, “torch1.x” would return the x-coordinate of the entity named “torch1”.
You can also refer to the script entity itself from its own script code using the implicit “self” variable. This can be handy if you need to refer to it’s coordinates. For example the following script prints the x- and y-coordinates of the script entity to the console:
print(self.x, self.y)
The second class of objects are objects that have no direct representation of them in the dungeon. For example, a Champion is an object that is contained inside the Party entity. You have no direct access to these objects but various functions return references to them. For example, the following script retrieves the first champion in the party and changes his name:
party:getChampion(1):setName("Jakob")
Global Functions
Entity Management
spawn(object, level, x, y, facing, [id])
Spawns a new object at given position on a dungeon level where x and y specify the x- and y-coordinates on the map and level is a level index. facing must be a number between 0 and 3 and it indicates the following directions: 0=north, 1=east, 2=south, 3=west. id parameter is optional. If given it must be an unique id in the context of the dungeon. If not given an unique id is automatically generated.
findEntity(id)
Returns an entity with given name or nil if no such entity exists.
entitiesAt(level, x, y)
Returns an iterator for entities at x,y in a given level.
allEntities(level)
Returns an iterator for all entities in a given level.
User Interface
hudPrint(text)
Prints a line of text to the text area at the bottom of the screen.
setMouseItem(item)
Sets the given item as mouse item, or destroys the mouse item if item is nil.
getMouseItem()
Returns the “mouse item”, the item attached to the mouse pointer. If there is no mouse item, nil is returned.
Sounds
playSound(sound)
Plays a sound effect. sound must be a name of a built-in or custom sound effect.
playSoundAt(sound, level, x, y)
Plays a sound effect at given position. sound must be a name of a built-in or custom sound effect.
Game Mechanics
rollDamage(power)
Returns a random amount of damage for an attack with given power.
damageTile(level, x, y, direction, flags, damageType, power)
Damages all creatures including the party in a given tile. direction specifies the direction of the attack for projectiles or melee attacks (0=north, 1=east, 2=south, 3=west). damageType must be one of the following: “physical”, “fire”, “poison”, “cold”, “shock”. Damage is rolled individually for all creatures using the power as base value. flags is a numeric bit field:
- bit 0: monsters recoil from the impact
- bit 1: ongoing damage such as poison cloud
- bit 2: damage originated from champion with ordinal index 1
- bit 3: damage originated from champion with ordinal index 2
- bit 4: damage originated from champion with ordinal index 3
- bit 5: damage originated from champion with ordinal index 4
- bit 6: ignore immunities
- bit 7: halve damage of back row party members
Bits 2-5 are used when dealing experience point awards. See also Champion:getOrdinal().
shootProjectile(projectile, level, x, y, direction, speed, gravity, velocityUp, offsetX, offsetY, offsetZ, attackPower, ignoreEntity, fragile, championOrdinal)
Shoots a projectile item. The parameters are:
- projectile: the name of the item to shoot.
- level,x,y: the initial position of the projectile in a level.
- direction: the shooting direction (0=north, 1=east, 2=south, 3=west).
- speed: the speed of the projectile (metres/second). Typical values around 10.
- gravity: the gravity force in y-direction. Typical values around 0.
- velocityUp: the initial velocity in y-direction. Typically set to 0.
- offsetX,offsetY,offsetZ: 3D offset in world space from the center of cell.
- attackPower: attack power of the projectile.
- ignoreEntity: the entity to be ignored for collisions (or nil if the entity should not ignore any collisions).
- fragile: a boolean flag, if set the projectile is destroyed on impact.
- championOrdinal: a champion ordinal number, used for dealing experience points. This parameter is optional.
Misc
print(…)
Prints all arguments to the console.
completeGame([cinematicsFile])
Completes the game and optionally plays back a cinematics file. cinematicsFile must be a valid cinematics filename. Note, in the Dungeon Editor this function only prints “Game Completed” to the console.
getForward(direction)
Converts direction, a number between 0 and 3 corresponding to a compass direction, to delta-x and delta-y values.
getMaxLevels()
Returns the number of levels in the dungeon.
isWall(level, x, y)
Returns true if the given square contains solid wall.
getStatistic(stat)
Returns the value of a built-in statistic. Possible statistics are: “play_time”, “monsters_killed”, “items_found”, “secrets_found”, “treasures_found”, “toorum_notes_found”, “skulls_found”, “grimrock_doors_opened”, “tiles_moved”, “pit_falls”, “melee_attacks”, “ranged_attacks”, “unarmed_attacks”, “rocks_thrown”, “spells_cast” and “potions_mixed”.
Alcove
Alcove:addItem(item)
Adds an item to the alcove. For example Alcove:addItem(spawn(“dagger”)).
Alcove:containedItems()
Returns an iterator for items contained in the alcove.
Alcove:getItemCount()
Returns the number of items in the alcove.
Alcove:setActivateAlways(enable)
Enables the activate always mode for the alcove. Normally when an item is placed on an alcove, the alcove is triggered only if it was empty. Likewise the alcove is triggered when the last item is removed from it. With activate always the alcove is triggered every time an item is placed or removed from the alcove.
Alcove:addConnector(event, target, action)
Adds a new connector from the entity to a target entity. Event, target and action are strings. Using this method is equivalent to creating a connector in the inspector.
Alcove:destroy()
Removes the entity from the level.
Altar
Altars share the same scripting API with Alcoves. The only difference is that an alcove is a wall item while an altar is placed in the middle of a cell.
Blocker
Blocker:activate()
Activates the blocker. An active blocker prevents monsters from moving through the square where the blocker is located.
Blocker:deactivate()
Deactivates the blocker.
Blocker:toggle()
Toggles the blocker on and off.
Blocker:destroy()
Removes the entity from the level.
BurstSpell
BurstSpell:setAttackPower(power)
Overrides the attack power of the burst spell.
BurstSpell:destroy()
Removes the entity from the level.
Button
Button:setActivateOnce(once)
If set to true, the button can only be triggered once.
Button:push()
Simulates a push of the button as if the button had been operated by the player.
Button:addConnector(event, target, action)
Adds a new connector from the entity to a target entity. Event, target and action are strings. Using this method is equivalent to creating a connector in the inspector.
Button:destroy()
Removes the entity from the level.
Champion
Champion:setEnabled(enabled)
Enables or disables the champion. A disabled champion is essentially an empty party slot.
Champion:setName(name)
Sets the name of the champion.
Champion:setRace(race)
Sets the race of the champion. The race must be one of the following: “Human”, “Minotaur”, “Lizardman” or “Insectoid”.
Champion:setClass(class)
Sets the class of the champion. The class must be one of the following: “Fighter”, “Rogue”, “Mage” or “Ranger”.
Champion:setSex(gender)
Sets the gender of the champion. The gender must be either “male” or “female”. The gender determines the sounds to be played when the champion is damaged.
Champion:getEnabled()
Returns true if the champion is enabled and false if the champion is disabled.
Champion:getName()
Returns the name of the champion.
Champion:getRace()
Returns the race of the champion.
Champion:getClass()
Returns the class of the champion.
Champion:getSex()
Returns the gender of the champion.
Champion:getLevel()
Returns the current level of the champion.
Champion:getOrdinal()
Returns champion’s ordinal index between 1 and 4. The ordinal index is an unique identifier for the champion. It is guaranteed that the ordinal index never changes after character creation.
Champion:setPortrait(filename)
Sets the image file to be used as champion’s portrait. The portrait must be a valid TGA file of size 128*128 pixels. The file must be located in “mod_assets” folder or contained in the base game archive.
Champion:isAlive()
Returns true if the champion is alive.
Champion:gainExp(amount)
Gives a number of experience points to the champion.
Champion:levelUp()
Gives just enough experience points to get to the next level.
Champion:getSkillPoints()
Returns the number of unused skill points.
Champion:addSkillPoints(amount)
Gives a number of skill points to the champion.
Champion:getSkillLevel(skill)
Returns the current level of a skill. The skill must be one of the following: “air_magic”, “armors”, “assassination”, “athletics”, “axes”, “daggers”, “dodge”, “earth_magic”, “fire_magic”, “ice_magic”, “maces”, “missile_weapons”, “spellcraft”, “staves”, “swords”, “throwing_weapons” and “unarmed_combat”.
Champion:trainSkill(skill, levels, dontSpendPoints)
Increases a skill by a number of levels. If dontSpendPoints is true, skill points are not spent for leveling up the skill.
Champion:consumeFood(amount)
Consumes an amount of food taking racial food consumption rate and other factors into account.
Champion:modifyFood(amount)
Adds amount to current food stat directly without applying any modifiers. Amount can be a signed value.
Champion:getFood()
Returns champion’s current food value.
Champion:setCondition(condition, value)
Sets the value of a condition. The interpretation of value depends on the condition but it corresponds roughly to the number of seconds that the condition should last. The condition must be one of the following: “poison”, “diseased”, “paralyzed”, “haste”, “rage”, “fire_shield”, “shock_shield”, “poison_shield”, “frost_shield”, “invisibility”.
Champion:setConditionCumulative(condition, value)
Sets the value of a condition to the maximum of current value and the parameter value. I.e. this method has the same effect as:
champion:setCondition(condition, math.max(champion:getCondition(condition), value))
.
Champion:getCondition(condition)
Returns the current value of a condition, or zero if the champion does not have the condition.
Champion:hasCondition(condition)
Returns true if the champion has a condition, i.e. the condition value is greater than zero.
Champion:damage(amount, type)
Deals damage to the champion. Type must be “physical”, “fire”, “shock”, “poison” or “cold”.
Champion:playDamageSound()
Plays the damage sound which is determined by champion’s race and gender.
Champion:setStat(stat, value)
Sets the base value of a statistic. The value of a stat cannot exceed its maximum value and the new value is clamped to the maximum value. Stat must be one of the following: “health”, “energy”, “strength”, “dexterity”, “vitality”, “willpower”, “protection”, “evasion”, “resist_fire”, “resist_cold”, “resist_poison”, “resist_shock”.
Champion:setStatMax(stat, value)
Sets the maximum value of a statistic.
Champion:modifyStat(stat, amount)
Adds amount to the value of a statistic. Same as calling
champion:setStat(stat, champion:getStat(stat) + amount)
.
Champion:modifyStatCapacity(stat, amount)
Adds amount to the maximum value of a statistic. Same as calling
champion:setStatMax(stat, champion:getStatMax(stat) + amount)
.
Champion:getStat(stat)
Returns the value of a statistic.
Champion:getStatMax(stat)
Returns the maximum value of a statistic.
Champion:getProtection()
Returns the current protection value of the champion.
Champion:getEvasion()
Returns the current evasion value of the champion.
Champion:getResistance(element)
Returns the elemental damage resistance value for an element. Element must be “fire”, “shock”, “poison” or “cold”.
Champion:getLoad()
Returns the current load of the champion in kilograms.
Champion:getMaxLoad()
Returns the maximum carrying capacity of the champion in kilograms.
Champion:insertItem(slot, item)
Inserts an item to an equipment slot. Slot must be one of the following: 1 (head), 2 (torso), 3 (legs), 4 (feet), 5 (cloak), 6 (neck), 7 (left hand), 8 (right hand), 9 (gaunlets), 10 (bracers), 11-31 (backpack slots).
Champion:removeItem(slot)
Removes an item from an equipment slot.
Champion:getItem(slot)
Returns an item in an equipment slot.
Champion:addTrait(trait, silent)
Gives a given trait to the champion. If silent is true there is no hud print. Trait must be one of the following:
“aggressive”, “agile”, “athletic”, “aura”, “cold_resistant”, “evasive”, “fire_resistant”, “fist_fighter”, “head_hunter”, “healthy”, “lightning_speed”, “natural_armor”, “poison_resistant”, “skilled”, “strong_mind”, “tough”.
Champion:removeTrait(trait)
Removes a given trait from the champion.
Champion:hasTrait(trait)
Returns true if the champion has a given trait.
Counter
Counter:setValue(value)
Sets the value of the counter.
Counter:getValue()
Returns the current value of the counter.
Counter:reset()
Resets the counter to the initial value.
Counter:increment()
Increments the value of the counter by 1.
Counter:decrement()
Decrements the value of the counter by 1.
Counter:addConnector(event, target, action)
Adds a new connector from the entity to a target entity. Event, target and action are strings. Using this method is equivalent to creating a connector in the inspector.
Counter:destroy()
Removes the entity from the level.
Door
Door:open()
Opens the door.
Door:close()
Closes the door.
Door:activate()
Same as Door:open().
Door:deactivate()
Same as Door:close().
Door:toggle()
Opens the door if it is closed, otherwise closes it.
Door:isOpen()
Returns true if the door is open.
Door:isClosed()
Returns true if the door is closed.
Door:addPullChain()
Adds a pullchain to the door. This function is intended to be used internally by the editor. Do not attempt to add a pullchain dynamically to a door from a script because it may cause problems with save games. This function is listed here only for completeness.
Door:setDoorState(state)
Sets door’s state immediately without playing animation and sound effects. State must be “open” or “closed”.
Door:setOpenedBy(key)
Sets the name of the item which can be used to unlock this door. Works only with doors with built-in locks.
Door:destroy()
Removes the entity from the level.
FX
FX:setParticleSystem(name)
Sets the particle system to be played when the FX is first updated.
FX:setLight(red, green, blue, brightness, range, time, castShadow)
Sets the light effect to be played when the FX is first updated. Red, green and blue define the color of the emitted light in range 0-1, brightness is light’s brightness typically in range 0-20, range is light’s range in world units (meters), time is the length of the effect in seconds, castShadow is a boolean flag which enables shadow casting for the light source. Large range and shadow casting can cause drops in frame rate.
FX:translate(x, y, z)
Translates (i.e. moves) the FX by x,y,z in world space. This function is typically used to lift particle system off the ground.
FX:destroy()
Removes the entity from the level.
Item
Item:setScrollText(text)
Sets the text for a scroll item. Lines are separated with ‘\n’ characters.
Item:setScrollImage(filename)
Sets custom scroll image to be displayed in the tooltip.
Item:setSubtileOffset(x, y)
Sets item’s relative position to the center of tile.
Item:setCharges(charges)
Sets the number of charges remaining.
Item:setFuel(fuel)
Sets the remaining fuel (in seconds) for torches.
Item:setStackSize(stackSize)
Sets the stack size for stackable items.
Item:getScrollText()
Returns the text of a scroll item.
Item:getScrollImage()
Returns the filename of the custom scroll image if it exists.
Item:getWeight()
Returns the weight of the item. Returns the total weight of a stack for stackable items.
Item:getUIName()
Returns the user interface name of the item.
Item:getCharges(charges)
Returns the number of charges remaining.
Item:getFuel(fuel)
Returns the remaining fuel (in seconds) for torches.
Item:getStackSize()
Returns the stack size for stackable items or 0 if the item is not stackable.
Item:containedItems()
Returns an iterator for contained items.
Item:addItem(item)
Adds a given item to a free container slot.
Item:insertItem(slot, item)
Inserts an item into given container slot.
Item:removeItem(slot)
Removes an item from a container slot.
Item:getItem(slot)
Returns the item in a given container slot.
Item:destroy()
Removes the entity from the level.
Lever
Lever:setLeverState(state)
Sets lever’s state immediately without playing animation and sound effects. State must be “activated” or “deactivated”.
Lever:setInverted(inverted)
Inverts the message to be sent when the lever is toggled, e.g. “activate” becomes “deactivate” and vice versa.
Lever:toggle()
Simulates a pull of the lever as if the lever had been operated by the player.
Lever:getLeverState()
Returns the state of the lever, either “activated” or “deactivated”.
Lever:addConnector(event, target, action)
Adds a new connector from the entity to a target entity. Event, target and action are strings. Using this method is equivalent to creating a connector in the inspector.
Lever:destroy()
Removes the entity from the level.
LightSource
LightSource:activate()
Turns on the light source.
LightSource:deactivate()
Turns off the light source.
LightSource:toggle()
Toggles the light source on and off.
LightSource:destroy()
Removes the entity from the level.
Lock
Lock:setOpenedBy(key)
Sets the name of the item which can be used to unlock this lock.
Lock:addConnector(event, target, action)
Adds a new connector from the entity to a target entity. Event, target and action are strings. Using this method is equivalent to creating a connector in the inspector.
Lock:destroy()
Removes the entity from the level.
Monster
Monster:setAIState(state)
Sets the AI state of the monster, which can be one of the following:
“default” the monster wanders lazily around in the dungeon, or
“guard” the monster waits in place until it sees or otherwise senses the party.
Monster:setHealth(health)
Sets monster’s health. Increases max health to accommodate the new health value if necessary.
Monster:setLevel(level)
Advances the monster in levels by giving it more health as specified by its level health adjustment property.
Monster:getHealth()
Returns monster’s current health.
Monster:getLevel()
Returns monster’s experience level.
Monster:addItem(item)
Adds an item to be carried by the monster. When the monster dies all items carried are dropped to ground.
Monster:destroy()
Removes the entity from the level.
Monster:setPosition(x, y, facing, level)
Instantly moves the monster to given location in the dungeon.
Party
Party:heal()
Restores all characters to full health and removes all harmful conditions.
Party:rest()
Puts the party to sleep.
Party:wakeUp(immediate)
Wakes up the party. If the immediate parameter is true, it indicates that the rest was interrupted abruptly, e.g. a monster attacked the party. The screen fades from black much quicker in this case.
Party:isResting()
Returns true if the party is resting.
Party:swapChampions(slot1, slot2)
Swaps the champions in slots slot1 and slot2. Slots must be in range 1-4.
Party:getChampion(slot)
Returns the champion in given slot (1-4).
Party:shakeCamera(intensity, duration)
Shakes the camera. Intensity is in the range 0-1 and duration is a length of the camera shake in seconds.
Party:playScreenEffect(particleSystem)
Plays an on-screen particle system. particleSystem refers to a particle system defined using the defineParticleSystem function.
Party:setPosition(x, y, facing, level)
Instantly moves the party to given location in the dungeon.
Pit
Pit:open()
Opens the pit. This has no effect if the pit does not have a trap door.
Pit:close()
Closes the pit. This has no effect if the pit does not have a trap door.
Pit:activate()
Same as Pit:open().
Pit:deactivate()
Same as Pit:close().
Pit:toggle()
Opens the pit if it is closed, otherwise closes it.
Pit:setPitState(state)
Sets the state of the pit immediately without playing animations or sound effects. State must be either “open” or “closed”.
Pit:isOpen()
Returns true if the pit is open.
Pit:isClosed()
Returns true if the pit is closed.
Pit:addTrapDoor()
Adds a trap door to the pit so that it can be closed. This function is intended to be used internally by the editor. Do not attempt to add a trap door dynamically to a pit from a script because it may cause problems with save games. This function is listed here only for completeness.
Pit:destroy()
Removes the entity from the level.
PressurePlate
PressurePlate:setTriggeredByParty(enable)
Sets whether the pressure plate is activated when the party steps on the plate.
PressurePlate:setTriggeredByMonster(enable)
Sets whether the pressure plate is activated when a monster steps on the plate.
PressurePlate:setTriggeredByItem(enable)
Sets whether the pressure plate is activated when an item is placed on the plate.
PressurePlate:setActivateOnce(enable)
If set to true, the pressure plate can only be triggered once.
PressurePlate:setInverted(enable)
Inverts the message to be sent when the pressure plate is activated, e.g. “activate” becomes “deactivate” and vice versa.
PressurePlate:setSilent(enable)
Sets whether the pressure plate makes a sound when it activates.
PressurePlate:isDown()
Returns true if the pressure plate is down.
PressurePlate:isUp()
Returns true if the pressure plate is up.
PressurePlate:addConnector(event, target, action)
Adds a new connector from the entity to a target entity. Event, target and action are strings. Using this method is equivalent to creating a connector in the inspector.
PressurePlate:destroy()
Removes the entity from the level.
ProjectileSpell
ProjectileSpell:setAttackPower(power)
Overrides the attack power of the projectile spell.
ProjectileSpell:destroy()
Removes the entity from the level.
Receptor
Receptor:setEntityType(entityType)
Sets the entity type which triggers the receptor. The receptor is a special wall trigger which activates when an entity of the specified type hits it.
Receptor:addConnector(event, target, action)
Adds a new connector from the entity to a target entity. Event, target and action are strings. Using this method is equivalent to creating a connector in the inspector.
Receptor:destroy()
Removes the entity from the level.
Secret
Secret:activate()
Marks the secret as found.
Secret:destroy()
Removes the entity from the level.
Spawner
Spawner:activate()
Spawns a new entity as specified by the spawned entity property. The spawner is then temporarily disabled for a period of time specified by the cool down property.
Spawner:setSpawnedEntity(name)
Sets the name of the entity to be spawned when the spawner is activated.
Spawner:setCoolDown(time)
Sets the cool down time in seconds.
Spawner:destroy()
Removes the entity from the level.
Teleporter
Teleport:activate()
Activates the teleporter.
Teleport:deactivate()
Deactivates the teleporter.
Teleport:toggle()
Toggles the teleporter on and off.
Teleport:isActivated()
Returns true if the teleporter is activated.
Teleport:setTriggeredByParty(enable)
Sets whether the teleporter teleports the party. Default is true.
Teleport:setTriggeredByMonster(enable)
Sets whether the teleporter teleports monsters. Default is true.
Teleport:setTriggeredByItem(enable)
Sets whether the teleporter teleports items. Default is true.
Teleport:setTeleportTarget(x, y, facing, [level])
Sets the target for teleportation. The level parameter is optional. It can be a level index, or “up” or “down”, in which case the parameter is interpreted as the level above and below the teleporter.
Teleport:setChangeFacing(enable)
If enabled teleported entities have their facing turned according to the teleport target. This property is set by default. If the parameter is false, the teleporter does not change the facing of teleported entities.
Teleport:setInvisible(enable)
Makes the teleporter invisible if the parameter is true, or visible if the parameter is false.
Teleport:setHideLight(enable)
Hides or unhides the dynamic light source attached to the teleporter. Useful for improving performance when there is a lot of teleporters close together in a level.
Teleport:setSilent(enable)
Makes the teleporter silent if the parameter is true, or audible if the parameter is false.
Teleport:setScreenFlash(enable)
Sets the state of the screen flash effect which is played when the party steps into the tele porter. If the parameter is true the screen flash effect is enabled, otherwise the effect is disabled.
Teleport:destroy()
Removes the entity from the level.
Timer
Timer:activate()
Activates the timer.
Timer:deactivate()
Deactivates the timer.
Timer:toggle()
Toggles the timer on and off.
Timer:isActivated()
Returns true if the timer is activated.
Timer:setTimerInterval(interval)
Sets the timer interval in seconds.
Timer:addConnector(event, target, action)
Adds a new connector from the entity to a target entity. Event, target and action are strings. Using this method is equivalent to creating a connector in the inspector.
Timer:destroy()
Removes the entity from the level.
TorchHolder
TorchHolder:addItem(item)
Adds an item to the torch holder. The item must be of type torch and only one torch may be inserted into the torch holder at one time.
TorchHolder:addTorch()
Shortcut for “TorchHolder:addItem(spawn(“torch”))”.
TorchHolder:hasTorch()
Returns true if there is a torch in the torch holder.
TorchHolder:setSilent(enable)
If the parameter is true the crackling flame sound is turned off. False makes the torch holder audible again.
TorchHolder:addConnector(event, target, action)
Adds a new connector from the entity to a target entity. Event, target and action are strings. Using this method is equivalent to creating a connector in the inspector.
TorchHolder:destroy()
Removes the entity from the level.
WallText
WallText:setWallText(text)
Sets the text which is display when the wall text is clicked with the mouse. Multiple lines can be separated with ‘\n’ characters.
WallText:getWallText()
Returns the wall text string.
WallText:destroy()
Removes the entity from the level.