User Tag List

Results 1 to 7 of 7

Thread: Number of objects to pick up?

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Dec 2007
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Number of objects to pick up?

    Maybe there's something simple that's escaping me, but I need to check for how many objects my character is carrying. I have a sort of telekinetic hand that can lift far too many things. I want to be able to count the number of group.collectible that have flag 1 on, and if it's too great, don't let the player pick up any more.

    I've tried adding to a variable everytime a new object is picked up, but that didn't work out well, at all.

  2. #2
    Clicker Multimedia Fusion 2

    Join Date
    Dec 2007
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of objects to pick up?

    I can't even tell it to just pick one object up, arggh...

  3. #3
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of objects to pick up?

    You can count how many objects are picked by using the select object extension.
    To retrieve the amount of object that has flag 1 on:
    * Group.1: Flag 1 is on
    - Set Global Value A to numSelectedByFixedV( "Select Object Extension", Fixed( "Group.1" ))

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of objects to pick up?

    The count number of selected doesn't work on qualifiers I'm afraid, you have to add up the number selected of each object type.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    Queensland, Australia
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of objects to pick up?

    You could just run a loop through them too :\. E.g.

    Start of Frame
    Spread Value 0 in Alt A of Group.1

    (Count Event)
    Start Loop "countobjects"

    On loop "countobjects" & Alt Value A of Group.1 = loopindex("countobjects") & Group.1 Flag 0 is on
    Add to Counter("Objects")

    Or something of that nature.

  6. #6
    No Products Registered

    Join Date
    Feb 2007
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of objects to pick up?

    Or have an alt value, call it holding limit or something, then everytime you pick up an object add 1 to the alt value, when you drop 1 then subtract from alt value.

    condition
    my codition to pickup items
    + holding limit < 5 (or how many limit you want)

    action
    ---pick up object
    + add 1 to holding limit




  7. #7
    Clicker Multimedia Fusion 2

    Join Date
    Dec 2007
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Number of objects to pick up?

    MrMan, I tried doing that but it was far too buggy. Sometimes it would add twice the value, others not at all. Because I have a "smooth" transition to pick up the object with the hand, it seems to glitch between being on and off. It's very argh.

    The spread value sounds like a good solution. Though for now, really, I'll just have it so you can pick up only one object. It makes the most sense really.

Similar Threads

  1. Pick all Objects in a Line?
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 24th April 2013, 12:47 PM
  2. Pick one of grouped objects.
    By RobertRule in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th November 2010, 09:00 PM
  3. Pick all objects in line
    By Olivier in forum File Archive
    Replies: 9
    Last Post: 9th July 2008, 06:42 AM
  4. Pick all objects in line
    By Olivier in forum File Archive
    Replies: 0
    Last Post: 6th July 2008, 06:41 PM
  5. pick objects
    By beannie in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 9th November 2007, 10:45 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
  •