Page 1 of 1

Any way for a function to know what triggered it?

Posted: Fri Jan 04, 2013 6:15 am
by Balthasar
I would like to spawn a few buttons and then use addConnector('toggle','myscript','myfunction') to hook them all to the same function. Is there any way for the function to know which button triggered it?

Re: Any way for a function to know what triggered it?

Posted: Fri Jan 04, 2013 10:31 am
by petri
Yes, there is! The function receives the entity as its first parameter.