User Tag List

Results 1 to 4 of 4

Thread: Displaying Global Values

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator ProPatch Maker
    coreyschroeder's Avatar
    Join Date
    Apr 2014
    Location
    ATX
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Displaying Global Values

    ***I would first like to apologize for the noob questions - still trying to learn this beautiful slice of software..
    Ps - is there a "beginners" sub forum that I should be posting on - I'm starting to feel bad... lol


    The Backstory -

    So, I decided to make a small racing game to help me dig a little deeper into fusion.
    (baby steps people, baby steps).

    I'd love to have the player win money for winning races - but what do they spend that money on? UPGRADES!
    So, I was thinking of starting with simple "engine upgrades", like a turbo charger, or performance exhaust, etc..

    I figure the best thing would be to use Global Values, and create custom variables for the car that would define its stock performance..?
    From there, alter those values accordingly (and subtract from player money) when one of the upgrades is purchased.

    So...
    I've created a small test app to try and work out my various values, and how I would like them to interact with each other.
    I have 5 buttons - V4, V6, V8, V10, V12 (for the player to select what engine size they want) - all buttons set a Global Value "cylinder_count" to their corresponding numbers.
    Based on the number of cylinders the car has, I would like to set other variables, like: "horsepower", "maxspeed", "zerotosixty", etc..
    I have all of the Global Values of the car displayed to the right of my buttons - select an engine size, and the program displays the various performance values for the car.

    The Question -

    I wanted to be all tricky, and have the game come up with a random number for the horsepower, just to give a little variation..
    For example, if you select a 4 cylinder engine, the game would give the player a horsepower value of between 100 and 225.
    From there, the game check the horsepower value, and creates a maxspeed and zerotosixty based on that number.

    Everything works well, with the exception of the horsepower - when the value is displayed, it is flickering through numbers super fast - like its continuously creating a new random value.
    Not really sure why this is happening..

    I created counters that display the various values of the global values I created.
    I set them to "always set count to (name of random car global value here)"...
    I have a feeling this is not the best way to have display items constantly update themselves? Better done with a fastloop?

    Sorry again for the noob question(s)...
    I greatly appreciate any help that you could lend!

  2. #2
    Clicker Fusion 2.5Android Export ModuleHTML5 Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    jaytmek's Avatar
    Join Date
    Mar 2014
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think if you run the frame and click the "+" button on the debug bar it should show you all of the global values. Obviously it won't be useful for the full game if you want the player to see them, but its useful for when you are testing.

    debug.png

    If its flicking through the values really fast then its probably updating the value every time it runs through the events. You could add another condition which would only be valid once if that makes sense? Like if horsepower is set at 0 before generating the value then add the condition "If horsepower = 0"?

    I'm pretty new to Fusion 2.5 as well so apologies if that hasn't helped!

  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    574
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    For setting the HP change the event to "Horsepower = 0" - Set HP to random. That way it'll run only the once. Just need to ensure that HP is 0 if you want it to generate a random HP.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator ProPatch Maker
    coreyschroeder's Avatar
    Join Date
    Apr 2014
    Location
    ATX
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks jaytmek - I definitely dont want every global value to be visible to the player... But, when the player is making engine upgrades, it would be cool to see the current specs (global values) of the car (as well as how the various egnine mods will affect those specs).

    The if condition worked out perfectly. Thanks!!!

Similar Threads

  1. Global Values & Alterable Values with same names
    By Gustav in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th November 2012, 06:15 PM
  2. how do i use Values and global values?
    By gamebuilder in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 24th April 2012, 12:54 AM
  3. Global Values
    By BlueEmber in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 18th May 2010, 12:52 AM
  4. Negative values in a List, and Global Values
    By aidmm in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th January 2007, 06:08 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
  •