Possible getConnector bug.

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
User avatar
Thorham
Posts: 80
Joined: Sat May 04, 2013 5:12 pm

Possible getConnector bug.

Post by Thorham »

I think Component:getConnector(i) contains a bug, because it only returns a string, namely the condition, while it seems it should return a list with the condition, target and action.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Possible getConnector bug.

Post by petri »

getConnector has multiple return values, you need to do something like this:

Code: Select all

local a,b,c = yourComponent:getConnector(1)
User avatar
Thorham
Posts: 80
Joined: Sat May 04, 2013 5:12 pm

Re: Possible getConnector bug.

Post by Thorham »

petri wrote:getConnector has multiple return values, you need to do something like this:

Code: Select all

local a,b,c = yourComponent:getConnector(1)
Oh lord :oops: Didn't realize Lua has multiple return values. Thanks :)
Post Reply