|
Okay I know this is such a long winded way of writing it but I gave it a go, could anyone possible explain how I can simplify this whole piece of script. To explain what I'm doing: I have two game objects that are instantiated at different points in my game, both scale from 0.01 to 1.00, I want the script to recognize when both objects have been instantiated and when they're both full scale.
Thanks - C
(comments are locked)
|
|
Why don't you attach a single script to each object that you want scaled: scaleScript.js
so they we'll be scaled to their original scale from zero, as soon as they are instantiated. This seems the simplest way to go. scaleScript.js could then also message your manager script when instantiated, and when at scale 1. Your manager script could then keep track of how many messages it's received and respond accordingly when all objects have reported in.
Apr 19 '11 at 02:26 PM
Toxic Blob
Okay I wasn't really after a scaling script, probably bad explanation on my behalf. I just wanted an simple way of writing what I have in the script above... but your suggestion of sending a message to the manager when the object have scaled fully works a treat, so you've indirectly answered my question! Thanks.
Apr 20 '11 at 10:50 AM
Caiuse
(comments are locked)
|
