User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Logic help - token choosing

  1. #1
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Logic help - token choosing

    My brain could do with some help here

    Player dives down to collect treasure. [random selecting]
    Each treasure yields a token
    On death (not enough air) a token is lost and respective treasure is returned.

    How to test for the availability of a token?

    Well, easy enough to test - is in zone/play area - but how to remove one and leave the others.

    eg. I could have token C & E and die. Only need to loose C 'or' E. But not both - which I can't seem to avoid. I also need to avoid negative values but this is not the main problem.

    Coding I would have a qualified loop. When the condition is met we 'break' the loop. Done.

    I hope this makes sense. It seems like it would be a common scenario so hope there is an easy solution.

    thanks - arfa

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Logic help - token choosing

    Can't you just randomly pick one?
    Working as fast as I can on Fusion 3

  3. #3
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Logic help - token choosing

    Sure LB - if I knew how. I am on a learning curve back from the late '90's and there is much new.

    OK... i see
    new condition>new obj>pick random in a zone
    I will try this.

    The one thing with ver2 (v's ver1.2) is more options - including extensions. I have many more yet to try.

    Any other suggestions on obj selection?

  4. #4
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Logic help - token choosing

    Hmmmmm,

    Looks like I might need a bit more here )

    I can set up the condition:
    Player dead
    + "Pick a random object from zone ...."
    but I am not sure where to from here.

    Each object has an ID - my tokens are 53-57
    Perhaps select a random number within range?

    MMF has a specific condition/action/expression logic that I have yet to get in mind. I will continue to experiment but any pointers would be appreciated.

  5. #5
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Logic help - token choosing

    Right click on the type of object you want to select in the New Condition menu, and choose "Compare to an Alterable Value". Then just compare your ID value to:
    Random(MAX - MIN + 1) + MIN

    Where, from your post, MAX you would type in 57 and MIN you would type in 53.
    Working as fast as I can on Fusion 3

  6. #6
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Logic help - token choosing

    I appreciate you patience here LB, thanks

    Just to be clear - I want to pick one object randomly from a group of 5

    The most promising new-condition to me seemed to be:
    New Objects > Pick a random object from zone
    but then I couldn't work out how to return or test the value of the selected object.
    ________________
    Looking at your approach...
    New condition > alterable value > compare to one..
    you said: > compare your ID value
    I am not sure how to set that.
    # Choose value > use expression or,
    # Enter expression > retrieve data from object

    And I presume I would need to test this for each of the (in this case 5) objects?

    I have not been able to finish this level on account of this one bit. This program has great power and I am enjoying extending my understanding. Thanks.

  7. #7
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Logic help - token choosing

    Oh, you just want to pick one of five objects? Would this work?


    It will pick a random object out of the currently selected objects, so if you have 5 selected it will choose one of those 5.
    Working as fast as I can on Fusion 3

  8. #8
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Logic help - token choosing

    I will come back to object picking...

    I have put time into this - with a slow, old(er) brain.

    1 - Thanks for the random(range) code. I work in PHP and am used to rand(MIN,MA so the syntax is a bit weird, but it works!
    2 - I realise object selection can just as easily be linear. Pick ANY object in the zone.
    3 - I see that object numbering is not what is referred to as object ID. I guess that ID is alt. val. A or, flag on or some such.

    The challenge was isolating one of the 5. I used a similar scenario to the mouse-visibility-group-toggle you referred me to a few days ago [hey! I am learning from you ]

    So, I have a working example.

    www.buddhamind.info/mmf/AK_object-select.mfa

    Perhaps there is a more elegant way to do this?

    PICKING....
    I was thinking to start a separate thread on this.
    There are several 'pick' options.
    The one I referred to earlier seems useful here:
    new cond. > new objects > pick a random obj in a zone
    But, what does it do? How do I return the value - say to a counter or string or anything? How do I know which object it picked?
    Your suggestion:
    new cond. > pick/count > pick "" at random
    I imagine this works if all my objects are copies but not clones. The tokens I am using are all different.
    "...pick a random object out of the currently selected objects"
    Selected how, by what?
    Would this be...
    new cond. > new ojbs > pick all obj in a zone ?
    Hmmmm, tried this a bit but can't seem to work out how to isolate one of five independent objects.

    Bear with me ;o
    I am slow - but diligent.




  9. #9
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Logic help - token choosing

    You could put the objects in a qualifier.

    To know what object you picked you could use its Fixed Value, or you could spread values in an alterable value and use that as the ID.
    Working as fast as I can on Fusion 3

  10. #10
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Logic help - token choosing

    "objects in a qualifier"
    The terminology...
    In the help file this looks very much like what I remember as 'groups' back from GF days. There used to be a limit on the number of objects in a level and groups was the way around that. If my memory is correct. I need to re-learn that.

    "Fixed Value"
    Terminology? Would this generally be what is referred to as ID?

    "spread values in an alterable value"
    Ah, you are stretching my boundaries of understanding. Great. I will look into this further.

    thanks so much for your time here LB.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. What is the Logic Behind This? (negate object overlapping "logic")
    By Blue66 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 10th January 2012, 11:54 PM
  2. Choosing Fonts
    By cajujoe in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 9th August 2011, 08:35 PM
  3. Quick Token
    By Jeff in forum Released Extensions
    Replies: 1
    Last Post: 23rd October 2006, 12:19 AM
  4. Quick token object not part of the extension pak?
    By spyfrog in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 11th August 2006, 02:54 PM

Posting Permissions

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