Posted By
|
Message
|
![](N:\My Art, Pictures & Photos\avatar.bmp) Patrix
Registered 21/02/2008
Points 13
|
17th November, 2010 at 16:51:36 -
Is there a way to have the counter stay the same from one frame to another ? And then from that frame back to the other? Thanks
n/a
|
![](http://clayt.in/files/images/beansieavatar-big.png) OMC What a goofball
Registered 21/05/2007
Points 3516
![KlikCast Musician! KlikCast Musician!](tags/kcicon.png) ![Guy with a Hat Guy with a Hat](tags/xmas.png) ![Somewhat Crazy Somewhat Crazy](tags/../uploads/screami-short.gif) ![ARGH Sign ARGH Sign](tags/argh.gif) ![Likes TDC Likes TDC](tags/..\uploads\FBlike2.png) ![Has Donated, Thank You! Has Donated, Thank You!](tags/coins.gif)
|
17th November, 2010 at 16:55:31 -
I could be wrong, but I believe if you set the counter to be a global object, it should keep its value. The global object checkbox is in the object's properties window.
If not, you could always use global values!
|
![](http://andyuk.tengudev.com/Games/Display.png) AndyUK Mascot Maniac
Registered 01/08/2002
Points 14586
![Game of the Week Winner Game of the Week Winner](tags/cup.gif) ![Second GOTW Award Second GOTW Award](tags/cup2.gif) ![Has Donated, Thank You! Has Donated, Thank You!](tags/coins.gif)
|
18th November, 2010 at 04:29:31 -
Yeah making the counter global lets it keep it's value.
.
|
![](http://dl.dropbox.com/u/16909290/logosmall.png) HorrendousGames Sourpuss
Registered 31/10/2009
Points 481
![VIP Member VIP Member](tags/vipbadge.png) ![Evil kliker Evil kliker](tags/skulltag.gif)
|
18th November, 2010 at 06:17:25 -
It might be a good opportunity to learn inis or even better, arrays. There are plenty of good tutorials in the articles section on how to use them, or if you're interested I can tell you some ways. But if you have certain things in game that need to be stored after the application is closed (as well as going between frames), you'll need to use something like an array. Things like high scores, save files, etc.
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!
http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942
http://www.create-games.com/project.asp?view=main&id=2160
|
![](N:\My Art, Pictures & Photos\avatar.bmp) Patrix
Registered 21/02/2008
Points 13
|
18th November, 2010 at 20:49:05 -
Thanks for the replies. My head is still kind of stuck in the Klik & Play days stuff. I think I understand the global thing now. Could you please describe what a ini is and what a array is and what they do? I do want to eventually make the progress in my game saveable. I'm still a beginer though. Thanks.
n/a
|
![](http://dl.dropbox.com/u/16909290/logosmall.png) HorrendousGames Sourpuss
Registered 31/10/2009
Points 481
![VIP Member VIP Member](tags/vipbadge.png) ![Evil kliker Evil kliker](tags/skulltag.gif)
|
18th November, 2010 at 22:34:14 -
In terms of global values, if you click on the main project, and click through the different tabs, you'll find global values and strings. If you want to make an object global, then there should be a check mark in one of the tabs in it's properties. Making an object global basically means the object will keep the data over the entire application, rather than just in that particular frame.
Basically the Array can be thought of as a grid. It can either be in a line, rectangle or cube.
When you create an array, you can choose to have a number on the x y and z axis of the array. Obviously the larger the array, the larger the file size of the array will be, so I usually tend to keep everything on the x and y axis, and leave the z axis to 1.
Each coordinate on the array contains data, either a number or text based on the array type.
I usually set my arrays to be text arrays because you can convert numbers to text to store, and convert it back to a number when I want to retrieve it. You cannot convert text to a number, then back to text and get the same thing, you'll just get back zero.
So, when you've got an array up, all you need to do is write a value or text to a certain coordinate when you want to store it, then read a value or text when you want to retrieve it. This array will erase when you move between frames, so you'll need to save it. At any time, you can save an array to a file of your choice, and it literally can be anything, even the extension (I know a lot of people that usually make it a .dll so people don't mess with it). Usually you save it right before you exit the frame, then you load it again at the start of the frame.
If you want to make a specific save point, it's probably not in your best interest to use the same array, since it will be keeping the data between frames. Instead, use a separate array, then just copy the temp array contents to it, and save it when you want to save. Then of course it can be loaded when the game is loaded.
If you aren't able to figure it out from my explanation, let me know and we'll go from there. I only do this because it's better for you to play around with it and learn the commands and junk yourself, rather than me just spoon feed it to you. Either way, good luck.
EDIT: I forgot to mention, Ini's are basically the same thing as an array, except it will only store and save a single value or text, versus an array which can store a large amount of different values.
Edited by HorrendousGames
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!
http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942
http://www.create-games.com/project.asp?view=main&id=2160
|
|
|