User Tag List

Results 1 to 2 of 2

Thread: I need help with counters

  1. #1
    No Products Registered

    Join Date
    Aug 2008
    Location
    Sweden
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I need help with counters

    Counters have fixed values. This means that I can access a specific counter in the frame even if it is just an instance of another counter.

    Theoretically when you use: At start of game, set CounterB to 5 that will set ALL counters called CounterB to 4.

    The use of the fixed value would then be to address a specific one of these counters and only set the value of THAT one to 4. However, there seems to be no actual system behind the fixed values, so how do i do it?

    I could do it the clumsy way and have an invisible object overlapping the specific counter and then set
    *At start of game
    *If InvisibleObject is overlapping counter
    -Set counter to 4

    But that looks clumsy

  2. #2
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: I need help with counters

    Well first of all, don't use fixed values like that. They can change arbitrarily later. I once relied on them for a game - bad idea

    This is indeed quite a problem with MMF - there is no instance inspector or any way to set up variables of instances in the frame editor (MMF3 *hinthint*).

    So a workaround, it is.
    Solution 1: Clone the counters, so each counter is a new "type", instead of duplicates/instances.
    Solution 2: The clumsy way. I used that in a game once, where I had treasure chests for the player to open - and I wrote that script that whatever was overlapping them at start would be "put inside" (stored in the variables). So in the frame editor I'd just put everything that goes inside on top of the chest. Depending on what you want to set it to, you could have +2 and -2 objects that add or subtract to the counter when they overlap it.
    Solution 3: Create some sort of level editor that lets you set up your objects and stores the level in a file and loads everything back from there as well. Note that this is a lot of work.

Similar Threads

  1. COUNTERS
    By RoachLIVEinLA in forum The Games Factory 2 - Technical Support
    Replies: 8
    Last Post: 18th January 2012, 03:50 PM
  2. Counters
    By BigBaboo in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 27th September 2007, 11:35 PM
  3. Counters
    By Guitaristinmakin in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th August 2007, 04:01 PM
  4. Bar Counters
    By Ross in forum Multimedia Fusion 2 - Technical Support
    Replies: 24
    Last Post: 24th September 2006, 04:19 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
  •