User Tag List

Results 1 to 7 of 7

Thread: life counter below 0

  1. #1
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Sep 2010
    Location
    Germany
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    life counter below 0

    Hi,

    for some reason I need the life counter to decrease below 0.
    The problem is that the condition player 1 life counter below 0 will never be true. While it works for "equals 0", it does not seem to work with negative values.

    Maybe the life counter can hold only positive values? (like an unsigned integer)

    What is my goal?

    Lets say the player has 4 space ships - 1 in use and 3 ship icons to show the number of available ships.
    I want the level to quit if there is no ship left in the hangar and the pilot destroyed his current ship.

    If the counter ends the level if the last ship is taken, it ends one ship to early.

    - is it a bug if the number of lifes cannot be -1?
    - what would you do?
    - my workaround could be to add one additional live and hide its icon offscreen - but I would like to know why the condition is never met.

    regards
    slacer

  2. #2
    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: life counter below 0

    Can you set the counter minimum to -1 in its properties?

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

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Sep 2010
    Location
    Germany
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: life counter below 0

    It seems that the live counter is just a visual representation of player1.lives. But player is a system object and I could not find a way to define the counter minimum in this case.

    Michael

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Sep 2010
    Location
    Germany
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Solved] life counter below 0

    It was not possible to let the live counter go below 0.
    To reach the goal I had to add a real counter and alter the condition to change the frame if the new counter drops below 0.

    Ok, I have to initialize and to decrement to different counter (player lives and counter) but it works.

    The idea to simply move the lives control a bit off screen did not work, because the icons will be deleted from right to left and I need the control to be in the lower right corner.


  5. #5
    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: [Solved] life counter below 0

    Oh, lives object. Thought you meant a counter. Sorry I mis-read your post. You can't set the regular counter property to -1as a minimum?

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

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Solved] life counter below 0

    A fix for your original way would be to change your code from:
    Player dies
    -Subtract one life
    Player has 0 lives
    -Game over

    To:
    Player dies
    +Player has 0 lives
    -Game over
    Player dies
    +Player has greater than 0
    -Subtract one life
    -Respawn

    That way the player having 0 lives is ok until his ship dies

    EDIT: You can add more than one condition to the same event. I see you're new here, so you might not have realised. Just right-click on the event number and choose "add a new condition".

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Sep 2010
    Location
    Germany
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [Solved] life counter below 0

    Great! This works good and is less confusing than my solution to use two places to keep track of the current number of lives.

    It is my first day with this software and I have to learn how this engine works

    Thank you all for your help

Similar Threads

  1. How to create a life bar?
    By gamer123 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 20th October 2011, 03:59 PM
  2. Help of enemy life counter
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 12th September 2011, 01:02 PM
  3. Enemy Life
    By Gate001 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th June 2010, 04:30 PM
  4. life bar?
    By vincent in forum Multimedia Fusion 2 - Technical Support
    Replies: 29
    Last Post: 19th May 2009, 06:09 AM
  5. Life Bug
    By LB in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th December 2008, 10:47 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
  •