User Tag List

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

Thread: Hey all, got a question regarding the lives object

  1. #1
    No Products Registered

    Join Date
    Jun 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hey all, got a question regarding the lives object

    I can't seem to make it work properly. When the character ship gets hit by an enemy ship, you lose a life. but even after all 5 lives are gone the game won't end. I have an "when last lives are destroyed" event going to end the application but it doesn't work.

    Any help is appreciated!

    Thanks,
    Chris

  2. #2
    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)

    Re: Hey all, got a question regarding the lives object

    "When last lives are destroyed" doesn't sound right - this event would trigger when the Lives object you're using is actually removed from the frame via a Destroy action. To detect when the last life has been lost, either use the "Number of lives has reached 0" condition, or check for the player's number of lives being equal to 0.

  3. #3
    Clicker Fusion 2.5

    Join Date
    Mar 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    This isn't working either

    Quote Originally Posted by DavidN View Post
    "When last lives are destroyed" doesn't sound right - this event would trigger when the Lives object you're using is actually removed from the frame via a Destroy action. To detect when the last life has been lost, either use the "Number of lives has reached 0" condition, or check for the player's number of lives being equal to 0.
    I have tried lives = 0 and when all lives are destroyed with either the "restart current frame" or the "restart application" and none of these restart the game. I have tried adding "Set number of lives" back to 3 when lives = 0 and it doesn't work. I am using the demo version (I have the full version at home) at work (teacher) could this be part of the problem?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The version isn't the issue.

    You have to include "run this event once" It would be "Number of lives has reached 0" + Run this event once.....end application or restart frame or whatever you want to do at that point. If you just have "Number of lives has reached 0",..it will continue to loop and it will never be true.

    What I normally do is when I want a game over event to happen is have a pause before the game ends. This way you can display a Game over graphic or whatever you like for a few seconds, then the game goes to your start frame.

    Like this: make an active object and place it off screen.
    "Number of lives has reached 0"
    +
    "Run this event once" Set active objects alterable A value to 1.

    Next line:

    Alterable A value of active is great or equal to 1..............add 1 to A value

    Next line:

    Alterable A value is greater or equal to 100.........Restart application.
    + Run this event once

    You can adjust the 100 to give you a longer or shorter pause to restart the application.

    Here's an example of how I do it sometimes.

    http://www.mediafire.com/?hfa0orkie6thmda

  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)
    Maybe
    Lives <=0

    Just in case lives skip 0

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

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Marv,.sometimes I ran the game that way and it would work,.but other times it wouldn't because it would loop that event, because it keeps checking it over and over. That's what I experienced anyway and I always had to add in "Run this event once" to fix it. I don't even do that anymore and only did it that way years ago. I don't use the lives object in my games. I make my own.

  7. #7
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,016
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    csprinks are you running the Application or running the 'Frame' as running the frame won't execute a 'End Application' or 'Restart Application' you'll have to run the application to see the desired result.

    If all else fails you should just implement lives into a global value and try it with that, Global Value A <= 0: Restart Application
    Want to learn Clickteam Fusion 2.5?




  8. #8
    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)
    If you cant have 0.5 lives, why not try:
    Lives < 1

    ?

  9. #9
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)
    This has got to be pretty easy to fix as the lives object has been around forever.
    The most common problems I have seen people have are

    Not running the entire application
    or
    the lives going below 0 because of your events before it gets to the one to check how many lives are done
    Its easy to check this -- Throw a counter on the screen and have it display the number of lives

    Condition
    Always
    Actions Set counter to number of lives

    Then you can see if the lives is 0 or not when you think it is zero

    its pretty common people event things so its negative lives -1, -2 for example.


    If you post up an MFA I would bet the reason could be spotted in seconds.

  10. #10
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by KLiK-iT View Post
    You have to include "run this event once" It would be "Number of lives has reached 0" + Run this event once.....end application or restart frame or whatever you want to do at that point. If you just have "Number of lives has reached 0",..it will continue to loop and it will never be true.
    Actually, "Run this event once" only ensures that it will happen once that frame. But if you are restarting the application or changing the frame like csprinks is doing, that shouldn't matter because you'd be leaving the frame anyway as soon as it was true. Also, if something continues to loop, it will always be true, not never be true.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Quick question about lives
    By Lucien in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 26th February 2013, 04:25 PM
  2. Lives object - best practice?
    By sbucci in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 28th September 2012, 05:43 PM
  3. Lives Object Problem
    By That_Sean_Guy in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 16th May 2008, 03:54 PM
  4. Getting the value of Lives
    By Krisando in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 30th April 2008, 07:24 AM
  5. Lives object
    By kmarshall in forum The Games Factory 2 - Technical Support
    Replies: 6
    Last Post: 19th June 2007, 09:35 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
  •