User Tag List

Results 1 to 6 of 6

Thread: Setting a counter to what you type?

  1. #1
    No Products Registered

    Join Date
    Mar 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Setting a counter to what you type?

    Hi, i am making a strategy game where you get to pick how much money you want to start with is there anyway you can set the counter (Money) to what you type in a text box on the previous frame.

  2. #2
    No Products Registered

    Join Date
    Apr 2008
    Location
    Weston-super-mare
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting a counter to what you type?

    This is quite simple:

    Where you type the NUMBER or value (which i hope is a string object), have it retrieve the value from the string object.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting a counter to what you type?

    You could store the value entered in the text box in a global value to carry it between frames. However, as the text box contains text, you need to convert it to a number - use the action "Set a global value" in the Special object, and set it to Val(Edittext$("Edit")) - at least, that's what I think it is from memory.

    Then, on the start of the next frame, set the counter to match the global value in which you stored the amount entered.

    You can edit the names of global values to make them clearer under your Application Properties.

  4. #4
    No Products Registered

    Join Date
    Mar 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting a counter to what you type?

    You cant type in a string object in the game can you? i was talking about the rich edit object or something

  5. #5
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting a counter to what you type?

    Quote Originally Posted by TSC
    You cant type in a string object in the game can you? i was talking about the rich edit object or something
    edit box

    you COULD use a rich edit object but an edit box makes more sense for this purpose

  6. #6
    No Products Registered

    Join Date
    Mar 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting a counter to what you type?

    done it now, thanks

Similar Threads

  1. [BUG] Counter not setting aways>random
    By paobrasil in forum iOS Export Module Version 2.0
    Replies: 7
    Last Post: 19th October 2012, 01:12 PM
  2. Setting an active to a counter health bar?
    By Mdsx in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 23rd January 2010, 08:53 PM
  3. [bug] Setting the Counter's movement …
    By RayMarble in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 26th August 2008, 11:25 PM
  4. Setting decimal places on a counter
    By maestro1 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th April 2008, 06:13 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
  •