Setting up a password for game access

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Setting up a password for game access

Postby arienram » Mon Nov 15, 2010 12:02 am

Hi everyone, asking for a bit of help regarding setting up a password where the player types in the password on the first frame screen, and the then, if correct, the game proceeds on to the main menu frame. I tried using the examples in the help files, but came up short when it came to preventing access to the game if the password was wrong. Copying the help files threw a fault. To create the password, I created a hot-spot on the screen with the words: ENTER PASSWORD. In the hotspot properties, I successfully got the msgbox to appear, typed in the password, and did a gotoframe at the end, but couldn't get passed that for a negetive.
My Code: If ENTERED_PASSWORD = inputbox ("Enter Password")
If ENTERED_PASSWORD = ("Arien") then msgbox ("Correct")
CreateTimedEvent 2,"Action.GoToFrame""Menu"",3,1",False
Works unfortunately, with any typed word. If I add an ELSE or return value, it throws an error, expecting 'End' of 'If' or some such. Any one out there compiled a successful code? I'd be happy to try it.
Cheers, Arien Ram. :?
I am interested in creating point and click games involving human themes and martial arts. In other words, action, adventure.
User avatar
arienram
Member
 
Posts: 28
Joined: Mon Jan 18, 2010 10:24 pm
Location: New zealand

Postby Lyberodoggy » Mon Nov 15, 2010 12:14 pm

Code: Select all
ENTERED_PASSWORD = inputbox("Enter Password")
If ENTERED_PASSWORD = "Arien" then
msgbox "Correct"
CreateTimedEvent 2,"Action.GoToFrame ""Menu"",3,1",False
else
msgbox "Incorrect"
end if



this should work...
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

password code

Postby arienram » Mon Nov 15, 2010 6:55 pm

Hi. Thanks for that Lyberdoggy. I'll give it a go and let you know how it goes. It's great to be able to come onto the forums, and get help like this.
Cheers, Arien Ram.
I am interested in creating point and click games involving human themes and martial arts. In other words, action, adventure.
User avatar
arienram
Member
 
Posts: 28
Joined: Mon Jan 18, 2010 10:24 pm
Location: New zealand

Game password

Postby arienram » Tue Nov 16, 2010 6:37 pm

Hello again. Just a quick note to let you know that the password access code worked 100%. Thanks. Also a strange little quirk in Adventure Maker if you are using a hotspot /advanced tab / TimedEvent and going to a created blank frame (provided by AM). I use this occaisionly to just create text on a black background. Well it throws a fault message. IE: it will go to the frame, but throw an error message every time. Instead, I created a proper JPeg black frame in Corel Paint and the fault message dissapeared. I mention this in case any one out there has struck the same problem. Its an easy fix.
Cheers, Arien Ram :)
I am interested in creating point and click games involving human themes and martial arts. In other words, action, adventure.
User avatar
arienram
Member
 
Posts: 28
Joined: Mon Jan 18, 2010 10:24 pm
Location: New zealand

Postby Lyberodoggy » Wed Nov 17, 2010 3:03 am

Hmm, thanks for the fix, but the bug you mention troubles me. It shouldn't appear.
Anyways, always glad I can help :)
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron