Page 1 of 1
Make trial game???
Posted:
Sat Jun 23, 2007 3:07 am
by Bee-Ant
Do you know how to make game with trial mode???
Sgt. Sparky...!!!where's your demo for me???!!!
To restore player's variables with type our name first...!!!
Posted:
Sat Jul 07, 2007 7:08 pm
by Troodon
There is functions to read the computer clock (like the real trial games) but I don't remember how it works. I'm also needing it.
Posted:
Sat Jul 07, 2007 8:17 pm
by Caaz Games
I was thinking of this too, but not with times, with the number of times you have started the game. and by using the save and load variables to do it. i think it would be like
- Code: Select all
if(Usage==10)
{
Exitgame();
}
And for another actor
- Code: Select all
Create Actor ->
Usage ++;
this code probably wont work tho.
Posted:
Sat Jul 07, 2007 8:26 pm
by Troodon
But the create actor isn't good if you want to have trial period(for example 1 week). The one-run trial could be made simply with timer. (for example)
Posted:
Sun Jul 08, 2007 12:14 am
by Jay S.
tekdino wrote:There is functions to read the computer clock (like the real trial games) but I don't remember how it works. I'm also needing it.
- Code: Select all
stTime t = getTime();
hour.textNumber = t.hour;
minute.textNumber = t.min;
second.textNumber = t.sec;
year.textNumber = t.year;
month.textNumber = t.mon;
day.textNumber = t.mday;
day_week.textNumber = t.wday;
day_year.textNumber = t.yday;
total_seconds.textNumber = t.sec_utc;
NOTE: Everything that comes before a ".textNumber" is the name of a text actor. (OR you could set them all as variables.)
As for guessing how a trail period could be used, sorry, but I have no suggestions.
EDIT: Ah.... Game A Gogo beat me.
Posted:
Sun Jul 08, 2007 12:16 am
by Game A Gogo
@ tekdino: There is a demo for this in the Documentation, just go on Scripting, Script reference, and find the function "GetTime()"
Posted:
Sun Jul 08, 2007 3:54 am
by Sgt. Sparky
I can make a Demo.
Posted:
Sun Jul 08, 2007 5:08 pm
by Troodon
Ah, so the documentation was the place where I found the GetTime() first time. And I searched only the forum...like always.
Posted:
Sun Jul 08, 2007 5:20 pm
by Troodon
And here is a simple trial system:
just save the starting day (by yday) and year (by year) into a array file. Then the game checks first if the array file exists (by checking if one number is correct). Then it checks should it set the trial start date (with one simple 0/1 variable in the same array)
If the data is 0, it sets the current yday and year to the starting date and makes the data to 1.
If the data is 1, it checks if a number of days has been complete after the start date saved.
What do you think?
Posted:
Sun Jul 08, 2007 7:14 pm
by Jay S.
If it's done via variables, wouldn't you think that, if someone knew, they could delete the saved file holding the variable values? They could do this repeatedly and have an infinite trial.
That's something I thought of earlier... Of course, forgive me if I'm misinterpreting your suggestion.
Posted:
Sun Jul 08, 2007 7:29 pm
by Troodon
But the game checks if the file is there!
There is one random number in array for example 1007. If it doesn't find that number (if the file is missing the number in that array is 0) it automaticly closes the game.
Posted:
Sun Jul 08, 2007 9:58 pm
by Jay S.
Ah, very well then. That's wise...
save it to.
Posted:
Mon Jul 09, 2007 12:51 pm
by kyensoftware
Save it to $WINDOWSPATH/System32/restoresystem......434.bakup
and no one will know...
I used things wit $ in front of it in Visual Basic! i think it is $WINPATH tho..