How to get the class's objects ?

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
maximilien
Posts: 3
Joined: Mon Sep 02, 2013 8:26 pm

How to get the class's objects ?

Post by maximilien »

Hi everyone,

I try to learn about the LOG2 editor. It's an amazing tool. But I've some problem with LUA ... :/
I understand more and more how to use the functions, etc... and I work with the documentation : http://www.grimrock.net/modding/scripti ... rComponent
So, I've all the functions by objet, great !
But in LUA, we must specify the class name after the ID, like that -> myDoor.door:function()
But how can I know what is the class of a specific object ?
Any are obvious, like door or lever etc. but it's not always the case.
the class of floor spykes is "controller"...

I found some by searching on this forum and on the web, but it nothing in the documentation...
Is there another scripting reference ?
I'm verry confuse with that :(
how do you know how class you must to use with objects ?

Thank you very much !
I try to find the answer on this forum, but my search was unsuccesfull :(

PS : sorry for my french English^^
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: How to get the class's objects ?

Post by petri »

Actually those fields are not class names, they are names of the components the object is made of. If you click on an object in the editor you can see the object's components in the inspector panel.
Post Reply