User Tag List

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

Thread: Adding 1

  1. #1
    No Products Registered

    Join Date
    Oct 2011
    Location
    Canada
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding 1

    I've been playing around trying to learn the basics of rpg programming in Multimedia fusion. I'm starting to get the hang of it thanks to everyones help here. I really do appreciate it...

    something that will always be important in rpg games is the ability to add 1 to a variable. There must be an easy way to add 1 to a global variable. What do you find the best methods to be?

    I find it a little daunting my way, because it's cumbersome. having a variable to act as a place holder. That variable incremements by 1 so that each time you trigger it it only happens once. I'm finding it hard to keep track of. There must be a better way. Is there an extension out there that lets you easlily add 1 to a variable?

    It's hard setting up events to do this...well, not knowing a good way to do it, it is, lol...

    either I forget something and it adds like 1000 instead of 1, or it just doesn't happen..sometimes I get lucky and 'duct tape' things up till they're functional, haha. There must be a better way...

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    What is your problem exactly? It cannot be as simple as adding 1 to a global value, is it really? Because theres is even an action dedicated to do exactly that.

    In the event editor grid, under the Special conditions Icon, select Change a global value / Add to, type 1 in the expression editor and click OK.

  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)
    As Popcorn said, it's... sort of difficult to imagine what you might be having problems with here, but as you said you add "like 1000 instead of 1", could it be that the condition you're using to trigger it is continually true (for example... if you're using an "Object is overlapping another object" event) and so it's triggering multiple times? If you're doing this, right-click and add an "Only one action when event loops" condition (again, under the Special object) to the same event row.

  4. #4
    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)
    Jibs. There is an open source "Community RPG Project" on the first page of my website. It has an inventory, NPC's and etc.

    Maybe that will help.

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

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Also, you might be doing this already but you MUST add lots of comments for any sort of big project or it can all turn into a spaghetti mess of trying to figure out what is going on should you need to go back and tweak something. Adding plenty of comments will let you know what events are doing what and what values are being added.

  6. #6
    No Products Registered

    Join Date
    Oct 2011
    Location
    Canada
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah, its not that. It's getting the event to only fire once...it's not adding 1 to a variable that Im having problems with, it's the condition that fires it. If that condition is true it seems to always add 1.

    do ya know what I mean?

    okay, say I have a condition if Goblin hp is <=0 add alterable value expreward of goblin to global variable playerexp... (and that variable is set to say 200)

    when the health of that goblin reaches zero it deosn't seem to add 200 to exp reward, it seems to jump to like 6000 because the condition is always true..

    add 1 never seems to add 1 as long as the condition is true..

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right click you condition
    Choose insert
    Select 'Special Object' ( looks like two computers ) ---> limited conditions ---> only one action when event loops

  8. #8
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ahh. Ok, sounds like the issue might be fixed if you add "only one action when event loops" to your condition, so that way it isn't running the event more than once when the reward occurs.

    Edit: Doh, too slow. Got sniped by King Cool lol.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Be aware though, by doing what i and Shaws suggest...
    When a Goblin has a HP of <= 0 ( still existing in the frame, playing a disapearing animation or whatever ), and another Goblin get a HP of <= 0, an XP reward will not be rewarded for that Goblin ( if both Goblins are of the same object that is )

  10. #10
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you use only one action when event loops it should still apply for multiple objects of the same type. It just runs the condition once for each object each time the conditions are met for that action. If you selected Run this event once, then it would ignore any further repeats.

    For instance, If you had enemy hit with arrow then add 100 to exp, and you added only one action when event loops to the condition, it would still do it every time an enemy on screen got hit by an arrow.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Adding a zero.
    By Fimbul in forum File Archive
    Replies: 1
    Last Post: 15th November 2009, 10:06 PM
  2. Adding Qualifiers
    By Nusua in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th March 2009, 07:19 AM
  3. Adding Outside Artwork
    By Hordolur in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th June 2008, 06:53 PM
  4. Adding Music?
    By Dudeofthed in forum Install Creator and Patch Maker
    Replies: 6
    Last Post: 24th January 2007, 11:24 PM
  5. Adding Strings with Lua
    By raytrace in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 1st November 2006, 03:02 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
  •