User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20

Thread: Global Values and Strings

  1. #1
    No Products Registered

    Join Date
    Mar 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Global Values and Strings

    I am Making a turn based RPG-like game. When i encounter an enemy i go back to the same frame every time, like a "Battle" frame.
    Question: How can i make it to where i can have my level, health, exp, and how can i make it to where it shows the enemy's health and name show up at different occasions.

    Also as a bonus how could i make attributes such as str, agility, stamina, etc. effect my stats. Would love some help

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Global Values and Strings

    Easiest way is to make your player object have alterable values (make the same alt values in every frame) then make it a global object.
    Working as fast as I can on Fusion 3

  3. #3
    No Products Registered

    Join Date
    Mar 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Global Values and Strings

    Well the best way to explain what my game is like a Pokemon game. On the screen there is a box that displays your health, exp, level, etc.

  4. #4
    Clicker Multimedia Fusion 2
    Greg's Avatar
    Join Date
    Dec 2006
    Location
    Poland
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Global Values and Strings

    If you need to handle a lot of values, then I recommend the AssArray Object. This extension allows you to keep a lot of data with an easy access and you can make it Global, by checking an option in the properties menu.

  5. #5
    No Products Registered

    Join Date
    Mar 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Global Values and Strings

    Ok thanks.

  6. #6
    RayMarble
    Guest

    Re: Global Values and Strings

    Quote Originally Posted by xXjbroXx
    ... When i encounter an enemy i go back to the same frame every time, like a "Battle" frame...
    It's probably best to put the whole battle into a different frame, and just call it as a subapp when needed. You can even set it to freeze everything on the "field" screen (where the hero can be seen walking around the map) during the battle - I assume you don't want the hero wandering around during the random encounter

    So in the "field" frame you just wait for the conditions that trigger the battle, then set parameters for the "arena" (type of enemy, which background graphics to use etc), and finally call the frame that holds the "arena" as a subapp. When the battle is over, calculate the XP / HP etc, close the subapp and the control will be automatically returned to the field screen.

    In this case you'll also have to find a way how to communicate between the field and arena screens - the most practical way is probably storing data in Global Values unless you have too many of them.

  7. #7
    No Products Registered

    Join Date
    Mar 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Global Values and Strings

    Yes RayMarble i was intending to make just a battle frame that i switch to everytime i encounter an enemy. Your idea sounds interesting, But I do not know how to make a subapp or how to code the information into it even if i could make one. Will using a sub application be easier than just having one battle frame?

  8. #8
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Global Values and Strings

    I have an open source example...Zoric. It uses a battle screen when an enemy is encountered.

    Link:
    http://www.castles-of-britain.com/mmf2examples.htm

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  9. #9
    No Products Registered

    Join Date
    Mar 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Global Values and Strings

    ah Thank you! I looked at your coding and was a little confused. why do you put in your condition, "Only one action when event loops" on almost everything? I figured out a little bit on my coding question, and it seems if i just change a global value based on which enemy i hit it seems a little simpler.

  10. #10
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Global Values and Strings

    Well, this was made over 2 years ago. I didn't want values to change too much every time something happened. I am glad that the coding "might help you out".

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Quick Global Values/Strings Question
    By CBSection31 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th August 2010, 12:06 AM
  2. Scan Global Strings and Other strings
    By Ausomeman in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 19th May 2010, 04:01 PM
  3. [BUG] MMF2 & Global Values/Strings
    By LB in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th May 2009, 01:32 PM
  4. Using Global Strings embedded in larger strings
    By Mudstick in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 12th May 2008, 01:23 PM
  5. 241_MMF2dev -Global strings refusing being global
    By Tiny in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th July 2006, 07:00 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
  •