I have the following objects:
_root.map.transformations.maptiles.spawner
_root.pawns.spawnedobject
The spawner object is having the heck transformed out of it, and the spawned object needs to follow it. I simply haven’t managed to get a handle on localToGlobal() or its friend globalToLocal(). Documentation and tutorials haven’t made things clearer, as neither of these work as I expect them to.
What I’ve found is that if I do localToGlobal inside the spawner in the form of:
this.localToGlobal()
…I can use the resulting coordinates to place the spawned object correctly. I expected to need to use:
_root.pawns.globalToLocal()
…on those results to get the final location, but using it actually misplaced the spawned object. So I didn’t use this function at all.
Now an object in a third path is breaking. The path is:
_root.map.transformations.tileanimation.newspawnedobject
I can see where I’m going wrong, but I can’t see what I should be doing to get this working correctly. Any advice/examples?