Paljas
07-12-2009, 11:37 AM
Hi,
I've googled my ass off, thought this was easy to find:
When writing a float script controller for some property of an object, how can you reference the object itself? I know you can use $instance_name if you know the name, but I want to write the controller script once, and copy the object multiple times, and don't want all to reference only the source object.
In my case, I have a light, and assigned a script controller to its intensity value. Somewhere in the script I need to get the position of the light the controller is for.
I've googled my ass off, thought this was easy to find:
When writing a float script controller for some property of an object, how can you reference the object itself? I know you can use $instance_name if you know the name, but I want to write the controller script once, and copy the object multiple times, and don't want all to reference only the source object.
In my case, I have a light, and assigned a script controller to its intensity value. Somewhere in the script I need to get the position of the light the controller is for.
