The Daily Click ::. Forums ::. Klik Coding Help ::. Creating a first run system
 

Post Reply  Post Oekaki 
 

Posted By Message

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
1st November, 2006 at 15:42:29 -

I want to create a built in system that detects wether the program has been run before. how can i do this?

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
1st November, 2006 at 15:43:12 -

INI.

 
n/a

Bibin

At least 9001

Registered
  01/07/2005
Points
  308

Silver Cup WinnerGOTW Winner!Has Donated, Thank You!VIP Member
1st November, 2006 at 15:54:48 -

Encrypted ini, so dudes don't change it.

 
n/a

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
1st November, 2006 at 16:11:36 -

tried that but i cannot for the life of me understand why it wont work. i have got the following events set up:

Start of frame
+Set file to Appdrive$ + Appdir$ + "config.ini"
+Set Group to firstrun

Timer = 00'01
+Set Hidden Counter to ItemValue runnumber

Timer = 00'02 and Counter <> 0
+Jump to Frame 3

Timer = 00'02 and counter = 0
+Jump to Frame 2

End of frame
+Set ItemValue (runnumber) to current ItemValue (runnumber)+1

Can anyone see any problems with this?

I have tried to move the timer conditions but nothing at all happens

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
1st November, 2006 at 16:18:36 -

No idea. That should work. I can make an example later, if everything else fails. MMF2, MMF or TGF?

Bibin: That seems kind of overkill. If people really want to change it, then why bother stopping them?

 
n/a

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
1st November, 2006 at 16:28:39 -

MMF. It just keeps jumping to frame 2. The reason i want this is that i have a setup screen but i dont want the damn thing displayed everytime you run the app.

Frame1=Loader with code above
Frame2=Setup Screen
Frame3=Main Menu

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
1st November, 2006 at 16:37:18 -

I got this once, too. Just make the timer gap bigger (00'10 and 00'20).

 
Old member (~2004-2007).

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
1st November, 2006 at 16:42:45 -

still does it. AGGHHHH. Slowly goin bald

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
1st November, 2006 at 16:55:34 -

Try replacing the counter code by 'on certain keypresses' events. Then, open and check the INI a few times, each step. Does it do something wrong?

 
Old member (~2004-2007).

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
1st November, 2006 at 17:22:54 -

Put the counter condition above the timer condition?

 
My signature is never too big!!!

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
1st November, 2006 at 17:50:47 -

I have already tried that and nothing happens. it just stays on the loader frame

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
1st November, 2006 at 18:55:25 -

Err, I've had problems with INI's only working in a compiled project (Stand Alone). You try that?

 
Craps, I'm an old man!

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
4th November, 2006 at 08:23:32 -

Try using Array Object instead?


You do a simple event in the LOADER to do this:

Start of Frame
... Load Array file

Start of Frame
+ value at 0 (x dimension) = 0
... Jump to SETUP frame

Start of Frame
+ value at 0 (x dimension) > 0
... Jump to MAIN frame



Then in the SETUP frame, do this:

Start of Frame
... Set 0 (x dimension) to 1
... Save Array File


This works for me.

 
191 / 9999 * 7 + 191 * 7

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
5th November, 2006 at 06:54:02 -

managed to get it working thanks anyway.

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
5th November, 2006 at 10:13:37 -

Um, care to explain WHAT went wrong?

 
Old member (~2004-2007).

Bibin

At least 9001

Registered
  01/07/2005
Points
  308

Silver Cup WinnerGOTW Winner!Has Donated, Thank You!VIP Member
5th November, 2006 at 10:17:56 -

Ah, I have an idea! Instead of checking the contents of the ini, just use the ini to store whatever config options you have. THen, use the file object to check if the ini exists! If it exists, it doesn't show the config frame. If it doesn't, it shows it. Simple.

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
5th November, 2006 at 10:56:53 -

Uhhh... What?

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
5th November, 2006 at 11:07:57 -

You should do:
set INI group to ...
set INI item to ...
set counter to value.

the above always works.

Not : set counter to value item
That never works for me.

But oke i use TGF so...

 
Oh sweet mary.

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14560

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
5th November, 2006 at 14:17:56 -

is it even possible to check if an ini file exists? If so, i didn't know.

 
.

Bibin

At least 9001

Registered
  01/07/2005
Points
  308

Silver Cup WinnerGOTW Winner!Has Donated, Thank You!VIP Member
5th November, 2006 at 14:21:30 -

Yes, the file object can.

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
5th November, 2006 at 14:33:57 -

Yhea just use the file object

 
Oh sweet mary.

Bibin

At least 9001

Registered
  01/07/2005
Points
  308

Silver Cup WinnerGOTW Winner!Has Donated, Thank You!VIP Member
5th November, 2006 at 14:39:01 -

Alright, here's some example files.

Gfactory:

http://http://bibinson.sitesled.com/thingum.gam



MMF2:

http://bibinson.sitesled.com/thingum.mfa

 
n/a
   

Post Reply



 



Advertisement

Worth A Click