Thanks very much for the help on this - I will download the example and do my best to implement it. I never realised the extra issues when having multiple frames, but I don't think I can realistically have a single frame containing 200 rooms![]()
Thanks very much for the help on this - I will download the example and do my best to implement it. I never realised the extra issues when having multiple frames, but I don't think I can realistically have a single frame containing 200 rooms![]()
Well that looks EXACTLY the way I was picturing doing this, so you must be a mind-reader! It is a stunning example, thank you so much. I am now in the process of moving the code into my existing project and getting my head around arrays so that I can update my "pieces found" Global Variable.
Once again, thanks very much for putting this example together, and also to the others who helped with ideas, it really is a very friendly and helpful forum.

Glad to help
Edit: Although because it was supposed to be a quick example of how it could be done, I just quickly grabbed the array object. It might be worth having a look at some of the other array type objects (that can be global) as well just to see if they might suit your needs better (depending on what other info you want to store).
Can I ask: Is there any reason the chest has 2 Alterable Values (ID and TreasureValue)? I was trying to use TreasureValue to give me a result on whether the chest contains treasure or not but it doesn't seem to work. I am guessing it is not used in this example and that I need to query the array as soon as the chest is collided with to get this information?

Both values were used in the example in the setting of the treasures and they correspond with the details stored in the array.
The confusion comes (my fault) because i did two examples in the same file.
For what you need it for you can get rid of the ID value. That was mainly used for the 30 boxes in one room example.
In the other example the ID is not required.
The TreasureValue on the other hand can be kept or got rid of depending on how you are setting up your chests / rooms. The info on what treasure goes in what box is stored in the array. On entering the room I pulled that value out of the array and stored it in the box itself and then used that to set it's animation.
So, the simple answer is that if you want, you can get rid of them both and just query the array when you need the info. I just thought it would easier and more code readable to be able to just query the box than to reference into the array.
So, you should have been able to check TreasureValue for that info: 0 meant no treasure, 1-5 meant each of the different types.
But like I said this is stored in the array so it's unnecessary and you can get rid of it if you want.
Also remember that because it's all in the array you can check the treasure status of any chest in any room at any time.
Don't know if I explained that properly, started to waffle ...
TreeHugger, thanks ever so much for this, after much porting and testing, it works a treat! It took longer than expected as I didn't want to use all your graphics so had to manually import the code and structure into my existing game and also I had a few order/logic issues which I finally sorted out through the Event List Editor!
To add to my counter, I used the extra check:
alongside the collision to add 1 to the counter and that is working perfectly now (I am guessing this is the correct way to do it?!).Code:ValueAtXY("ListTreasure", CurrentRoom, 0) > 0
I also wanted to be sure I understood the array too and I think I have it now.
Once again, thank you so much for your help with this, it has helped the game engine to progress beyond all recognition!
Tim.

Just wanted to say that the graphics weren't mine. They were created by Tiles. I got them ages ago from his site 'Reiners Tilesets' which has lots of graphics available and if I remember correctly, lots of them are in mfa or cca files so can fit straight into your MMF library. Great resource for anyone like me that is rubbish at making their own graphicsOriginally Posted by timcclayton
![]()
Very nice graphics sets - I am creating my own graphics for this game but it is also not my strength! I much prefer building the engine if I am honest but need (much) more time with MMF2
It is a very impressive piece of software and I am honestly blown away with what it can do. I have seen a number of games produced with MMF2 and I am impressed with what can be achieved - it is at least something to aim for...![]()