Hi! My query this time is in regards to if it's possible to make an object (briefcase) follow a specific instance of another class (grunt). There will be multiple instances of the grunt class.
Any ideas?
Thanks!
You could just have the specific grunt keep the briefcase with him. You would add an instance field to hold a reference to a briefcase. Assign the briefcase to the field of the grunt that is to have one and leave all the others with a null value. At the end of the act method, ask if the reference is null. If not, move it to a position that is some offset to the position of the grunt.