How to Make a FNaF Fangame in Clickteam | Part 15: Saving Player's Progress and Exporting Your Game!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi i'm brady heggy and this is i don't even remember the number at this point but this is the final episode in my tutorial series how to make five nights at freddy's fan game in click team fusion 2.5 in this episode we're going to cover an ini which saves your progress in the game as well as how to export your game into an exe file so you may have noticed that i have yet to put in the final five nights which is because i have largely been at my dad's which is where i am right now and so for that reason i apologize for the poor audio quality but i have not had much time to work but that doesn't really matter because it's going to work the same way the first thing that we're going to want to do here is create a new object you can insert a new object by right clicking or hitting ctrl j and click find the ini folder in your objects if you can't find it you can also type ini insert this object and where you put this doesn't matter because while it shows up physically if you hit f7 to run you can see that it doesn't actually show up in your game all this is is a file that saves into your application exe's data once the game is closed a certain value or string and if you're thinking about it that can become very obviously useful if you want to make a game that saves your progress now what we want to do here is create a new group of events so insert a new group of events we're going to call this night saving the first thing you're going to want to do under special which is the gear is compared to a global value you're going to check for if the knight is greater than a certain value this value is zero because no matter what at the beginning of the frame if you first boot up the application your global values will all be set to zero because at the start of the frame you don't want to override your saved file by setting all values to zero so you only want to save the ini if your knight is not equal to zero now if our knight is equal is greater than zero under the i and i set value to and then you can just retrieve a global value set the ini to night now you need to insert a new condition and this will be always and we are going to under ionize set current file and you can call this file whatever you want i'm going to call it night the reason that you need to do this is you are telling the ini to grab the specific file there is a method where you can set the current group or item and in this way use an ini to save multiple values but it's always been easiest for me to just create new inis and have each store a different value this way you don't have to worry about slightly messing something up and then everything going wrong however if you do use new ini for each value i do recommend naming the iii to the name of that value so this ini will just be named knight now we're just going to create a new condition and we're going to say it's the time or equal to a certain value and this can be any value greater than zero i'm going to use five hundredths of a second the reason that it can't be zero is click team has a slight error in that it's not able to load an ini in the first frame of the game so you just have to make sure that you're firing this event slightly after the start of the game and when we do this we are going to change a global value just say set knight to and under i and i get value so you should be setting the global value knight to the value of the knight ini and hit ok now we're going to sort of cheat here we don't have to play through our game to make sure that our knight is setting to the right value instead what we can do is under global values in this little extra window here just click the plus sign under global values and now you're able to edit each global value so i'm just going to set the knight to three what the heck now if we close our game and open it back up if we open global values we can see that our knight is still equal to three great now let's add a new button which will be our continue button you can just do this by editing the string that you have already to say continue as well secondly let's create a new string here and let's move this next to our continue button this will show the value of our knight currently and let's just clone our new game button and hit f2 to rename it to continue button great now we are going to create a new group of events for our continue button the first condition that we're going to add is under our mouse check for mouse pointer over an object and this will be our continue button and if this is true we will set our knight counter under visibility to make object reappear now add a new condition check for mouse pointer over an object our continue button but negate this condition and under this condition which is if the mouse pointer is not over our continue button under visibility for our alterable string that we've made make the object invisible let's create a condition that says always and for our always event change our alterable string to hit the str button here and now retrieve the global value the value of our knight hit ok now if we run our game we see that when we hover over the continue button we see which knight we are on however our continue button doesn't do anything now we're going to create a new condition to fix this that says mouse user clicks on an object if the user clicks on the continue button insert a new condition into this event compared to a global value if night is equal to one and then jump to a frame knight one loading now you can just copy and paste this event and edit it for if the knight is equal to two jump to your jump to your frame knight to loading now you can just apply this to however many knights you have for me that's two because i'm lazy and i haven't added the other knights yet i'm sorry whatever all right let's edit this knight to b2 and then we can add this as an extra little test to make sure that our saving is still working run your application again and you'll see that we are at night two and if we click continue we are taken to the night 2 screen followed soon after by knight 2. so we can see that everything here is working just fine alright we've learned saving at a continue button and the last thing that we need to do is learn to export our game before you export your game you might want to create a custom icon you can do this by clicking on the application name and hovering over about in the icon click edit and you will be able to upload 256 pixel 128 pixel 48 32 and 16 pixels versions of your app icon in various and varying color levels you should just be able to get away with just making these five resolutions and then uploading them for these extra types of resolutions you can do this the same way that you import an object just by hovering over import and selecting it in file explorer finally you can build your project by clicking on file hover over build and click application you can now type in your application name after navigating to where you want to save it in file explorer and hit save now you can see that you have exported if you have done it correctly an application which you can run just like any other exe file so that's the end of the five nights at fred crap so that's the end of the tutorial series how to make a fnaf fan game and click team fusion 2.5 i hope that you've found it incredibly useful and i hope to see the links to your game in the comment section section down below i'm brady heggie as always for god's sake save your work and uh i mean there's no next time you don't have to tune in next time but if you're not subscribed i'd appreciate you subscribing so you can see future tutorials on various topics and bye
Info
Channel: Brady Hege
Views: 9,847
Rating: undefined out of 5
Keywords:
Id: It8zF3KWkA8
Channel Id: undefined
Length: 9min 29sec (569 seconds)
Published: Sun Jul 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.