16
Technical forum / Attaching a script to a 3d actor
« on: August 23, 2009, 01:17:48 AM »
Hello
I have some questions about attaching a script to a 3d actor.
This is the situation. I have a global loaded 3d actor. In one scene I attach a script to the actor, which then generates a particle from the actor - the particle appears in that scene. Once the scene has changed the particle stops, as I expected and wanted
When returning to the scene the same scripts run again and it attaches the script to the actor to create the particle.
However, my questions are... is the script already/still attached to the globally loaded actor, even though I attached the script from within a scene script?
Do I need to detach the script from the global actor when leaving the scene with the particle?
Will I end up with repeats of the same script attach to the 3dactor if the player returns time and time again to the scene?
Should I be attaching the script to the actor3D file and triggering the script in the scene itself?
Many Thanks
I have some questions about attaching a script to a 3d actor.
This is the situation. I have a global loaded 3d actor. In one scene I attach a script to the actor, which then generates a particle from the actor - the particle appears in that scene. Once the scene has changed the particle stops, as I expected and wanted
When returning to the scene the same scripts run again and it attaches the script to the actor to create the particle.
However, my questions are... is the script already/still attached to the globally loaded actor, even though I attached the script from within a scene script?
Do I need to detach the script from the global actor when leaving the scene with the particle?
Will I end up with repeats of the same script attach to the 3dactor if the player returns time and time again to the scene?
Should I be attaching the script to the actor3D file and triggering the script in the scene itself?
Many Thanks