Any way for a function to know what triggered it?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
Balthasar
Posts: 32
Joined: Sun Dec 09, 2012 1:53 am

Any way for a function to know what triggered it?

Post 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?
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

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

Post by petri »

Yes, there is! The function receives the entity as its first parameter.
Post Reply