Any way for a function to know what triggered it?
Any way for a function to know what triggered it?
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?
Yes, there is! The function receives the entity as its first parameter.