Here is the code for my DroneController script
http://pastebin.com/Ps5gfvTF
So what happens is, when a user clicks on an asteroid, a drone is instantiated, and it has this script attached to it.
Then using SendMessage, the gameobject for the asteroid is sent to the harvest function in this script.
When the harvest function is called, it prints “Message Recieved” to the log (this works), it assigns the object to a new variable name (this works), it sets moving to true, and prints the location of the asteroid to the log screen (this also works).
What is not working, is moving is not getting set to true.
If I manually set moving to true in the inspector, then the movement code works. I shouldnt have to do that though. As soon as the harvest function is called moving should be set to true.
Any ideas?