User Tag List

Results 1 to 5 of 5

Thread: Several items with its own health

  1. #1
    Clicker Fusion 2.5Android Export ModuleFirefly 3D Module

    Join Date
    Sep 2010
    Posts
    577
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Several items with its own health

    Hey! I ran in to a little problem. My solution for now is to just limit the player to have 1 item at a time. Ok so here goes...

    In my game you can find/buy/craft pickaxes for mining gold/gemstones. All pickaxes have HP so if you use it too much, it will eventually break. If you already have one pickaxe and take a new one, the first one will have it's current health set to a "Next health" variable...so when the new pickaxe has been used up, the first one will become the active one and have it's health reset to the "Next health". This would work perfect if you could only carry 2 at a time. I realise that this will be a problem if you can have more than 2...You take one, use it a little, take another, use it a little, take yet another, use it....and so on....

    So in my head it means that the first pickaxe won't get it's saved health back because "Next health" will have been overwritten to the value of the latest pickaxe you are using when you take another. So I think for now I just have to limit the player to have 1 at a time and simply just give it 100% health if you take another...I don't want to keep it like that since you will be able to buy and sell items in the game...but if I must so...oh well. Having a limit for only 1 item in the entire game is not so bad. I could live with that.

    But maybe there is a simple solution that I simply just doesn't see right now in my tired old head? I really don't want to make all pickaxes seperate objects with it's own health. Then I must keep track of which pickaxe you are currently using. It will be too much work and I don't want to have a limit for how many you can find in the game...I admit I'm not the strongest coder but so far I have been able to make all the stuff in my RPG work like a charm...but this little thing is beating me

  2. #2
    Clicker Fusion 2.5 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)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Several items with its own health

    All you need to do is to create an alterable value in the pick axe as "durability" that starts at 100. When you equip the pick axe you can read the durability alterable value. Whenever you use it you subtract from this durability alterable value. The value will always be retained between each object. You only need to create one type of each pick axe in the game. When you craft a new one, just use the "create object" action to create another one. The values will be retained in each separate pick axe.

  3. #3
    Clicker Fusion 2.5Android Export ModuleFirefly 3D Module

    Join Date
    Sep 2010
    Posts
    577
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hmm not sure that's possible the way it's set up. I have a counter increases by 1 when you take a pickaxe...in the inventory menu there's an image of a pickaxe (If you have one)...when you move the "Item selector" over it...the game checks how many you have. So no matter how many you have there will only be one showing up in the inventory window and a counter will tell you how many you have. (Like the zelda inventory) You never really equip them. You only use it automatically with the interaction button when mining is available. On every hit, the Pickaxe HP is reduced until it's 0, then it breaks...so basically there's only 1 HP counter for all pickaxes you have and only one counter that keeps track of how many you have. Ahhh but maybe I'm just stupid and tired right now

  4. #4
    Clicker Fusion 2.5 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)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Several items with its own health

    Okay sounds simple enough. Then just have a separate counter for the current pickaxe durability. When it reaches 0, subtract 1 from the total number of pick axes in the inventory and reset the durability to 100.

    Don't let the player switch pick axes so that they always use the one with less durability until it breaks so a new one can replace it.

  5. #5
    Clicker Fusion 2.5Android Export ModuleFirefly 3D Module

    Join Date
    Sep 2010
    Posts
    577
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yeah that is also an option! That would work best then. Sometimes you can take pickaxes with low default health that's what made it a little complicated but yeah that is the best way I think! thanks

Similar Threads

  1. Import library items as unique items?
    By Alpha17x in forum Fusion 2.5
    Replies: 0
    Last Post: 23rd January 2015, 04:54 AM
  2. Need help with health !!!!
    By MostDreaded in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 28th December 2010, 02:28 AM
  3. Health Bar Example
    By nivram in forum File Archive
    Replies: 5
    Last Post: 25th January 2009, 09:18 PM
  4. health bar
    By brad in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 18th January 2009, 12:50 AM
  5. Health Bar
    By PaulW in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th May 2007, 07:25 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
  •