Well, this is my 1st article, but I'll call it hint.
It's writed for TGF.
Password play BY J5
1. Bad school
I'll begin with a BAD example:
I was playin' Saving The City, adventure made by Klik
products. I completed first part, and started second part. On start, it says:
ENTER THE PASSWORD GIVEN AT THE END OF THE PART II. The pass is *****. I noticed that the game wasn't protected, so I opened it in TGF. I saw that the game uses #$%&?*
counter password system. You know, you press first letter of password, it adds 1 to counter. Press the 2nd key of password + the counter is equal to 1, it adds 1 to counter, etc.... What a dumb pass system, 'cuz really it's easy to crack. If pass has 5 chars, press all letters on keyboard 5 times, and VALID PASSWORD.
You know in TGF in storyboard editor, where you can set the password. Pretty cool, but everybody(including me) wants to create his OWN password system. Well, I was working on that. Now I'll give you some hints.
2. Ideal password system - first part : level editor - graphic
Let's create a good password system.
First, create a new level. Goto level editor. Make a text object. Explain to the user what to do in that text object. Now, create an edit object. Create a new button. Set up the button text to etc. "check". Now, minimize TGF and make an error in windows, 'cuz they will display a dialog box. Now, press alt and print screen. Goto paint and paste that dialog box. Delete the existing text and write example "invalid password". NOTE! DELETE THE BUTTONS FROM PICTURE! Save that and drag that BMP file from explorer to TGF. Right click on that new picture object and click on new object----> active object. Now delete the picture object. Drag the new active object to bottom of the playfield. Make 2 new buttons, with text Try again & Quit(quit is optional). Put them on the bottom of the active object(bmp dialog box with error invalid pass). That's it,nowhere comes "eventing"!
3. 2. Ideal password system - first part : event editor - programming part
Chu! Now goto event editor. First, make an event "start of level. Then make an actions: make invisible dialog object with error "invalid password" and buttons "try again" and "quit". NOTE! In level editor you can open setup window of these two buttons, and select checkbox "hide on start" and then you won't need to make an action to hide these 2 buttons. Next event: button "check" clicked. Make 3 actions: make active object "invalid pass" visible, and same thing for 2 buttons, try again and quit. And one more action: dehighlight. How to make that action? Edit box actions--->control---->enabled---->off. Now, new event. Compare two general values(in special conditions). First value is string of edit box. Here it is: Edittext$( "Edit Object" ) Now, the second value will be the password you want. BTW, click equal if it isn't. Click OK. Now, insert an event "button "check" clicked" in that same event line. Now, for that line of events, make an action that will jump to the level that you want. If you want to have multiple passwords, you'll have to repeat this line of events again, but change the "second value" to the password of your choice. Now, new event. Button "try again" clicked. Action: restart current level. And last event, button "quit" clicked. Action? End the game.
That's it! Now try the password level!
BTW, visit www.inet.hr/~elint/pass.gam for example.
And here's little FAQ.
Q: In the article sads that we print-screen a windows error dialog box. Why we can't use question object instead?
A: This pass-level is maked on this concept: when you click the button check, it'll display an active object that says: invalid password, no matter is password correct or wrong. If the pass is correct, the game will warp to the level of your choice, and the user won't see that dialog box. But if you use question object instead, the quest. object will STOP THE GAME until the user click one of answers, and the game won't warp to the next level.
That's the reason. You can do it, but only if you have one password
Greetings from j5