0

Trying to understand Script init() for agentScript override sample

I'm poking around with the sample AgentScript (from the examples folder) and was hoping for some clarification on the following...

 // Init will be called by the script loader after the constructor and after any public fields have been initialized.

I read this as "Sansar calls the script loader after the constructor and public fields have been initialized." - But I don't see the resulting function running (popping a modalDialog) so I'm thinking either something changed, or I'm not following the event sequence.

1. Am I correct in understanding that the AgentScript may be placed in an object in world?

2. If 1 above is correct, does that object have to be defined as a collidable rigid body? Can it be a 'non-physical object'

3. When is the object with the init override instanced? Is it when the scene loads, or does the script itself need to be explicitly called from a higher level script.

4. Are there any more detailed examples?

Thanks in advance for any info.

7 comments

Please sign in to leave a comment.