Page 1 of 1

Getting the list of items in a surface

Posted: Wed Mar 02, 2016 3:17 pm
by vieuxchat
I just can't make it work.
How do I get the list of the items in a surface ?
There's no SurfaceComponent:getItems() method :(

EDIT: It's always like that.. after spending an hour to look at the subjects here I finally found my answer several minutes after posting -___-
So the answer :
"for _,i in surface:contents() do"
Where the hell that "contents()" method is explained ? I didn't found it in the Scripting reference...

Re: Getting the list of items in a surface

Posted: Wed Mar 02, 2016 9:37 pm
by minmay
It's not listed in the grimrock.net scripting reference but you can find it in the component function list.

Re: Getting the list of items in a surface

Posted: Thu Mar 03, 2016 12:44 am
by vieuxchat
Wow ! Nice :) My new favorite page.
Thanks a lot.