Monitor friends and enemies in a zone
Greetings All,
I am trying to translate a classic puzzle into MMF.
I have 3 friends and 3 enemies on one side of a river that need to be transferred to the other side of the river by boat. There can never be more enemies than friends on either side.
I need help monitoring the number of friends and enemies on the left and right banks of the river separately. I've tried several things but nothing works. I wondered if detectors or the Easy Detector extension would help but I really have no clue how to use detectors. I've read lots of stuff but am still pretty lost.
Any help would be greatly appreciated.
Re: Monitor friends and enemies in a zone
With things like this, it's important to separate the game data from what's actually displayed. Keep count of the number of friends and enemies on each side, and use that data to display them on-screen, rather than doing it the other way around and reading the on-screen information to find out the situation of the game.
Re: Monitor friends and enemies in a zone
Hi DavidN,
Thanks for the quick response. Unfortunately, I have no idea how to do what you suggested. Any chance you could give me an example to get me going.
Re: Monitor friends and enemies in a zone
I'm still looking for help with this. Anyone?
Re: Monitor friends and enemies in a zone
I'm not sure I understand what you mean.. but if you want to compare the number of objects in an area, there's several options to choose from in the "new object" conditions. One of them is "pick all objects according to their value"--maybe you could do it so that if it's an enemy, and it's on the left side, the value is set to 2, or if it's on the left side, to 1. Then again, there's the "compare number of X objects in a zone" condition, which makes this process easier.
Re: Monitor friends and enemies in a zone
Thanks Alonso.
I'm beginning to understand what you and DavidN said. I am rebuilding my frame using alt values as position indicators (0 if on left bank, 1 if on boat, 2 if on right bank). Then when player clicks on friend or enemy, the position alt value is checked and changed according to where it should be moved to, etc.
I haven't figured out whether I need to do every move by individual object or I can do it by enemy or friend qualifier, but I will just test that out.
After I'm done, I will post my solution so that others can make suggestions to improve it or as a help to others.
Thanks
Re: Monitor friends and enemies in a zone
Greetings all,
I have finished the problem solving puzzle.
As promised, here is the link to download it.
It looks like I will be making it into a full blown tutorial as a way of giving back for all the help I have received. Any comments or suggestions, especially regarding the scripting would be welcome.
Here is the link to the download:
http://www.mediafire.com/?5hvwmsxzwre
No extra extensions are required.
Looking forward to your feedback.