User Tag List

Results 1 to 6 of 6

Thread: Counter to string

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Oct 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Counter to string

    Is there a way to set an alterable string to use the value of a counter, in addition to text?
    For example, make it display "Health: 20, Ammo: 5" when the values of counters "health" and "ammo" are 20 and 5 respectively.
    I looked around the expression editor, but couldn't find anything that worked.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    A counter can only display a value. Use a string instead, and set the alterable string to something like:

    "Health: " + Str$(health) + ", Ammo: " + Str$(ammo)

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Oct 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It says "syntax error" when I try that.

    *Edit*
    Or, did you mean replace the counters with strings? Will that allow me to change the values at will?

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure "health" and "ammo" are the actual values of health and ammo.

    I would leave the two counters offscreen, and display their values as part of a string object as Jamie suggested.

    "Health: " + Str$(value("health")) + ", Ammo: " + Str$(value("ammo"))

  5. #5
    Clicker Fusion 2.5 (Steam)

    Join Date
    Oct 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A-HA!
    That did it. Thanks.

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem!

Similar Threads

  1. Unable to change a string with the list obect if string contains three periods in row
    By redpandagames in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 4th January 2013, 03:01 PM
  2. Putting a counter value into a string?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 18th May 2012, 06:54 PM
  3. Adding Half a Counter's Value to Another Counter
    By soloman in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th June 2010, 10:30 AM
  4. counter value to string (tricky)
    By the_raven in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 3rd April 2009, 09:00 AM
  5. Storing a counter value on a string
    By Snakesoft in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th September 2007, 08:38 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
  •