User Tag List

Page 3 of 3 FirstFirst 1 2 3
Results 21 to 28 of 28

Thread: How to randomly populate treasure chests?

  1. #21
    No Products Registered

    Join Date
    Dec 2008
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to randomly populate treasure chests?

    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

  2. #22
    No Products Registered

    Join Date
    Dec 2008
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to randomly populate treasure chests?

    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.

  3. #23
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to randomly populate treasure chests?

    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).

  4. #24
    No Products Registered

    Join Date
    Dec 2008
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to randomly populate treasure chests?

    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?

  5. #25
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to randomly populate treasure chests?

    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 ...

  6. #26
    No Products Registered

    Join Date
    Dec 2008
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to randomly populate treasure chests?

    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:

    Code:
    ValueAtXY("ListTreasure", CurrentRoom, 0) > 0
    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?!).

    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.

  7. #27
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to randomly populate treasure chests?

    Quote Originally Posted by timcclayton
    to use all your graphics
    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 graphics

  8. #28
    No Products Registered

    Join Date
    Dec 2008
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to randomly populate treasure chests?

    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...

Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. Making Treasure Chests
    By ZayLong in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 6th November 2014, 01:40 AM
  2. Treasure Scratch
    By Jeff in forum iOS Released Games & Apps
    Replies: 1
    Last Post: 10th November 2011, 06:17 PM
  3. Populate a combo box with SQL Server databases?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 11th October 2011, 03:14 PM
  4. Random Treasure Example for timcclayton
    By TreeHugger in forum File Archive
    Replies: 3
    Last Post: 11th November 2010, 10:57 AM
  5. Random Treasure
    By tonycrew in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 26th May 2010, 04:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •