Hello,
Still fairly new to all this, but I finally attempted something more than just a test to see how stuff works. (well, I guess I did make a very simple breakout game too..)
I wanted to make a starcraft style resource harvesting cycle, but wasn't able to overcome one problem.
I had a mine, a carrier, and a main building. It started by sending the carrier by RTS to the mine. Once the 'arrived at location" event happened, the carrier's resource variable would increment by one, and the mine's variable would decrease by one. This all worked fine.
The problem came in when I tried to send the carrier back to the main building. Since the 'arrived at location' event isn't indexed or specific to a particular object, I have no way of knowing *which* object the carrier was standing by, so it kept triggering both the 'pickup' and 'dropoff' code.
I tried several ways of using variables to try to keep track of where the carrier had been sent, and not allowing it to begin movement back to where it was already standing. I also tried using a condition depending on whether or not the carrier was actually carrying something.
I tried using collision to tell which object the carrier had arrived at, but it doesn't appear that works during RTS movements, and my attempts to create a collision detection box wasn't helping either.
None of this worked out, and I feel that I'm making it far more difficult than it needs to be.
I don't have the cap file anymore, as I had other ideas to try, and in the end, nothing worked.
How would you approach this ?
Thanks,
Z