This content has been marked as final. Show 2 replies
The code that you show looks correct... but you say that it is in a Movie Script. The 'me' parameter that you are using will be <Void> if 'on shoot me' is in a Movie Script: placing VOID on the actorList will have no effect.
You could change your code to this:
-- Movie Script
vBullet = script("Bullet").new()
-- Parent Script named "Bullet" --
-- This is where all your calculations go
This is just the bare bones of a Parent script. You will probably need to have a reference to the 3D member, and to store the value of the milliseconds when the bullet was fired. You can use properties for these. You can set the values for these properties in the 'on new()' handler:
-- Parent Script named "Bullet|" --
p3DMember = member("3D world") -- or whatever your member's name is
pStartTime = the milliseconds
If you are used to using globals to hold permanent values, then you will understand that properties can hold permanent values too. But property values can only be accessed from inside the script instance itself. They are not 'global' in scope; they are owned by the Bullet instance. This means that you can create several Bullet instance, each with its own value of pStartTime.
Thank you, that cleared up my mind.