![]() ![]() Returns an iterator for all entities in a given level. Returns an iterator for entities at x,y in a given level. Returns an entity with given name or nil if no such entity exists. If not given an unique id is automatically generated. If given it must be an unique id in the context of the dungeon. facing must be a number between 0 and 3 and it indicates the following directions: 0=north, 1=east, 2=south, 3=west. 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. Party:getChampion(1):setName("Jakob") Global Functions Entity Management For example, the following script retrieves the first champion in the party and changes his name: You have no direct access to these objects but various functions return references to them. For example, a Champion is an object that is contained inside the Party entity. The second class of objects are objects that have no direct representation of them in the dungeon. For example the following script prints the x- and y-coordinates of the script entity to the console: This can be handy if you need to refer to it’s coordinates. You can also refer to the script entity itself from its own script code using the implicit “self” variable. “class” returns the class name of the entityįor example, “torch1.x” would return the x-coordinate of the entity named “torch1”.“level” returns the dungeon level index of the entity.“facing” returns the facing of the entity (0=north, 1=east, 2=south, 3=west).“y” returns the y-coordinate of the entity on the map. ![]() “x” returns the x-coordinate of the entity on the map.“id” returns the unique identifier of the entity.For example, the following script calls the rest() method on an entity with the id “party”:Īll entities have the following properties that can be accessed with the dot operator: You can refer to an entity by simply typing it’s id. Each entity has an id, a string which identifies the entity uniquely. ![]() For example buttons, pressure plates, teleporters and the party are all entities. 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. Accessing EntitiesĪlmost all things in Legend of Grimrock are modeled as objects. See the Lua reference manual for more details about their usage. In addition the following standard Lua functions can be used: tonumber, tostring, type, pairs, ipairs, and all functions in table, math and string modules. The Lua functions and methods described here can be accessed from a script entity and typed on the console. Refer to the tutorials for more detailed examples on how to use the material described here. The focus of this document is on completeness rather than brevity. You begin on Shipwreck Beach.You are reading the Lua scripting reference manual for Legend of Grimrock. More detailed maps will be shown for the walkthroughs for each of the various levels. This is an overview of the isle locations. Once you’re done with this you can download any of the many custom maps to continue your adventures. ![]() The main game features a large isle to explore with dungeons to crawl through and towers to climb. There are 42 kinds of monsters on the isle with 30 of them being new to Legend of Grimrock 2. There are 8 character classes and 5 races. You must discover the mysteries of the isle and overcome it’s challenges if you wish to escape.Įach of the prisoners can choose a unique race and class depending on how you want to play the game. A group of prisoners shipwreck on the Isle of Nex. Legend of Grimrock 2 is an old-school dungeon crawler with modern aesthetics. ![]()
0 Comments
Leave a Reply. |