User Tag List

Results 1 to 7 of 7

Thread: Fnaf fan game- Counter won't work correctly+ suggestions?

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Dec 2015
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fnaf fan game- Counter won't work correctly+ suggestions?

    Hi!, I am making a fnaf-fan game (Like many have done before me ), Although this is still only my 4th month using CF, so I've probably done it incorrectly. I made the "Office" AND each Camera room its own separate frame, So for storing counter values, I used the INI ++ object. So if the player puts up the monitor (thus ending the frame and going to another)- save Global Values. Then at start of frame- Load Global values. It seemed to have been working, but One problem with the Time counter has caused a chain of problems- I'm using alterable values for the "animatronic movement" that are all based on the actions of the Time/clock.

    - if counter/Timer=12- set alterable values to zero- no enemy movement.
    - If counter/Timer is greater than or equal to 3 (AND less than 6)- Movement starts.

    Whenever I leave and return to the office frame, the counter does not increase as "fluently" as it is suppose to. In the event editor, I put "Every 1 min. 10 sec."- add one to counter. But it sometimes takes 2 to 3 minutes instead, OR not at all. I strongly think this has something to do with the INI++ object saving global values, but how do I make it so that it could still save the other global values (power, etc.) but not the Timer? Is there a way to save the values separately?

    Or Should I do something completely different?.

  2. #2
    No Products Registered

    Join Date
    Jul 2015
    Location
    MI, USA
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I recommend having the office be an active object, and the camera rooms (empty and with animatronics) be other animations in the same active object so you can keep it all in one frame. This is the way Scott Cawthon does it + it will be more smooth. So instead of jumping from frame to frame, just change animation of "Active".


  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,156
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Recommend going single frame as well ^
    may require a little more starting setup, but you will gain much more ease in setting up various events
    and wont' need to return back to older frames to update them with newer ideas.

    But if you're going multiframe - why not using a global value as the time counter?
    Global values are kept between frames, so you shouldn't need to save them in the INI from frame to frame
    (unless on game quit - restart)

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Dec 2015
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @JJsecord & schrodinger- Thank you for your help and suggestions, I guess it didn't occur to me at the time that I was making the game that I could have had them as global values. I also had just realized that it makes more sense as they would work over the amount of frames, or else the only real way to get a game over would have been on the office screen. I will try this out

  5. #5
    Clicker Fusion 2.5 Developer
    PBarwick's Avatar
    Join Date
    Jul 2014
    Posts
    390
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The reason you have the problem with the timer is because whenever you change frame the timer is reset to 0.

    So if 1 minute into a frame you change frame, your timer will reset to 0 and it will take another 1 minute 10 to trigger the event.

    Instead, you could make a global value be your timer, and do something like:

    - every 1 second
    = add to global value

    - global value = 70
    = do stuff
    = set global value to 0


    If you wanted to not reset the global value every time, you could do:

    - global value Mod 70 = 0
    = do stuff


    The 'mod' calculation means 'divide by a number then give me the remainder'. This means that the event above is essentially checking for whenever the value is a multiple of 70.

  6. #6
    Clicker Fusion 2.5 Developer

    Join Date
    Dec 2015
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @PBarwick- That makes sense, I didn't know that the counter would reset itself like that, I'll work on that when I get the chance. Thank you. (Hopefully this time I'll get it right, I messed up alot).

  7. #7
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    934
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by schrodinger View Post
    Recommend going single frame as well ^
    may require a little more starting setup, but you will gain much more ease in setting up various events
    and wont' need to return back to older frames to update them with newer ideas.
    YES, listen to this man he knows of what he speaks.

    Sometimes you might HAVE to use multiple frames but trust me you WILL forget things or add things later and you'll have to copy / paste or change across a zillion frames and you'll be a sad puppy that day.

Similar Threads

  1. Save game with INI - FNAF screen tutorial
    By Sparckman in forum Guides, Tutorials, Examples, Widgets
    Replies: 0
    Last Post: 21st November 2015, 05:33 PM
  2. FGL doesn't work/link correctly
    By Hydra in forum Flash Export Module 2.5
    Replies: 2
    Last Post: 16th September 2015, 07:27 AM
  3. Back button doesn't work correctly
    By AndyH in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 11th May 2013, 09:10 AM
  4. Doesn't retrieve global counter correctly
    By RayMarble in forum File Archive
    Replies: 0
    Last Post: 20th March 2010, 01:53 PM
  5. [Bug]Edit Box doesn't work correctly in SubApp
    By Jacob in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th October 2009, 01:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •