Help, with enter text/password

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

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

Help, with enter text/password

Postby mercedes » Mon Mar 24, 2008 5:24 am

Hi there
...
T.I.A. to anyone who answers this..

I have asked these questions already, a few times...but to my knowledge that havent' been answered...if they have been I apologize.. :oops:

How do I go about creating something that the user/player can enter text into an empty field..

.Ex. computer password...Create username and password. Is this possible..so that when its wrong it says..wrong password..or something to this affect.
Or even just be able to have the user text, the right one it..

Also, can i create a calculator that the user can punch in numbers..? or upload an animated one that they can..


Also how to change coloured boxes...say red to green and then blue...


Not sure if these questions are related or not with animations or variables or both..Or whether or not any can be done with Free version of AM

I would appreciate some help with this...:D


Thank you very much..

~*Mercedes*~
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Mon Mar 24, 2008 7:01 am

Well, I can answer your first question...
There's a very easy way to do so and it's written in AM's documentation.
Just write in the frame's advanced

Code: Select all
LoadControl TextBoxObject(A number indicating the index. I will use 1)
TextBoxObject(1).Visible=True
TextBoxObject(1).Move x*15,y*15,w*15,h*15 //These characters must be replaced with the coordinates and the width and height you want the textbox to be

Do the same for every textbox you want, but remeber to change the index
Note that this will appear after you test the frame.
Now go to a hotspot in the frame and take the values of the hotspot like this
Code: Select all
returnvalue=TextBoxObject(1).Text


Now you can use If parameters to check for the right password. I was working on a project like that but something went really bad so I can't attach it :P
Anyway This may make things more clear if you download it and see the source code: http://www.adventuremaker.com/phpBB2/viewtopic.php?t=3638
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Mon Mar 24, 2008 3:19 pm

I don't have full version..:(..is there no way to do it with free version.....?
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Mon Mar 24, 2008 3:33 pm

You can try it by evaluating, but you can't use it in a game without AM full sorry...
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby Mystery » Mon Mar 24, 2008 7:23 pm

I agree, you need scripting for passwords and calculations.

However, as I already answered you in another forum, you can change the colors of boxes (your 3rd question).
To make it available on this forums, too, I'm going to repost my reply here aswell:

To create changing colors, you need to work with variables.
A simple example: change colors from red to yellow, and then to green when the hotspot is clicked, you need to create 3 similar hotspot images with the different colors, and also variables.
Create for example the variables red_clicked and yellow_clicked.
Then create a hotspot, and load in the hotspot properties the green image in it.
Create a second hotspot on the top of the first hotspot, and load the image of the yellow image in it on the Action Tab of the Hotspot Properties. On the Variables Tab of the Hotspot Properties, set "Change the value of one or more variables..." to yellow_clicked=1; and also set "The hotspot must only be enabled if..." yellow_clicked=0 (so when the player will click this hotspot, it will disappear, and thus the green image underneath it will be visible).
Create a 3rd hotspot, and load the red image in it. On the Variables Tab of the Hotspot Properties, set "Change the value of one or more variables..." to red_clicked=1; and also set "The hotspot must only be enabled if..." red_clicked=0 (so when the player will click this hotspot, it will disappear, and thus the yellow image underneath it will be visible).
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby Tony_LaRocca » Tue Apr 01, 2008 1:26 am

Is there any way to have the textbox without the black border?

-Thanx
User avatar
Tony_LaRocca
Member
 
Posts: 34
Joined: Wed Feb 20, 2008 4:14 am

Postby mercedes » Tue Apr 01, 2008 1:39 am

Here are some posts with text boxes if you have full version.

http://www.adventuremaker.com/phpBB2/vi ... text+boxes

This one might be more suitable for you.

http://www.adventuremaker.com/phpBB2/vi ... text+boxes


I apologize if this isnt what you were looking for.. :oops:
Last edited by mercedes on Wed Apr 02, 2008 11:27 am, edited 1 time in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Tue Apr 01, 2008 12:00 pm

Mercedes thanks for trying to help...
No, TextBoxes don't depend on the windows' options...
They are standard VB objects...

I know how to control the inner color and probably there must be a way to control the border color too (white border with white inner= no border), but I don't know it...
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Mon May 05, 2008 11:03 am

Code: Select all
LoadControl TextBoxObject(A number indicating the index. I will use 1)
TextBoxObject(1).Visible=True
TextBoxObject(1).Move x*15,y*15,w*15,h*15 //These characters must be replaced with the coordinates and the width and height you want the textbox to be


I want to be able to do this..but I have no clue what exactly it is i'm typing and especially WHERE..lol...like under which tab..in the hotspot's property box...

Do the same for every textbox you want, but remeber to change the index
Note that this will appear after you test the frame.


What do u mean by change the index..i see u used 1..is that so if i have other textboxes in the game or giving it value like a variable....so saying that the user has clicked on it.. ?


Now go to a hotspot in the frame and take the values of the hotspot like this


Code: Select all
returnvalue=TextBoxObject(1).Text


Im not sure where to put this either..i see u say hotspot..but under what and where..I guess I'm just not sure what u mean by "take the values of the hotspot"..

Perhaps if u explained it a bit more..I could understand what I was doing..that helps me if I know what I'm doing at the same time as doing it..therefore not really just copying and pasting your code..know what i mean..?

Also, is this the right code for also if they type in wrong password..it's gonna say..wrong..try again..? Also where do i put the actual password in this code..

I'm going to search around some more on the site..unfortunetly i read most of the help files..but couldnt find this..I'll try again.. One of the links that might have explained scripting a bit further was no longer available..[GM knows about this.] Also thought i would ask here cause its the same topic of what I'm looking for..~

Thanks again Lyberodoggy..~
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Mon May 05, 2008 11:11 am

Mercedes, this tutorial might make it a bit clearer for you:
http://www.adventuremaker.com/phpBB2/vi ... php?t=3365

...although you have mentioned it yourself in one of your posts as I've just realised.

The index number is this:
LoadControl TextBoxObject(index_number)

Yes, if you create more than 1 text box within one game, you need to increase the index_number.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Mon May 05, 2008 11:50 am

To create changing colors, you need to work with variables.
A simple example: change colors from red to yellow, and then to green when the hotspot is clicked, you need to create 3 similar hotspot images with the different colors, and also variables.
Create for example the variables red_clicked and yellow_clicked.
Then create a hotspot, and load in the hotspot properties the green image in it.
Create a second hotspot on the top of the first hotspot, and load the image of the yellow image in it on the Action Tab of the Hotspot Properties. On the Variables Tab of the Hotspot Properties, set "Change the value of one or more variables..." to yellow_clicked=1; and also set "The hotspot must only be enabled if..." yellow_clicked=0 (so when the player will click this hotspot, it will disappear, and thus the green image underneath it will be visible).
Create a 3rd hotspot, and load the red image in it. On the Variables Tab of the Hotspot Properties, set "Change the value of one or more variables..." to red_clicked=1; and also set "The hotspot must only be enabled if..." red_clicked=0 (so when the player will click this hotspot, it will disappear, and thus the yellow image underneath it will be visible).




Is there now perhaps a way that I can do this..with full version..differently ?..If not, when u say load colors in..do u mean frames or icons? I'm just curious if that's the way to do it easier is with icons..I just discovered t his myself with my last game, but didn't do it cause i discovered it at the end of the game.
Also was wanting to do it say like a stop light..so there would be 4 boxes..all of them to go from RED to YELLOW to GREEN....but the sequence in the end being three colours..so in other words..the code persay would be RED RED GREEN..or whatever..do u know what i mean..?..

I'm really happy i bought full version..I'll be glad when i know it a bit more..lol..

I want to be able to move a pillow up and down..too..lol..or couch cushion.without having to change frames..Is this possible Mistery..?

Im going to go and look at link u posted here and see if this helps me a bit..just thought I'd ask whilst you we're here..

Thank you very much as well for responding..to previous post ~!
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Mon May 05, 2008 12:14 pm

I mean of course the hotspot image (~icon).

With VBScript it's easier to create such puzzles in my opinion.

Remember Insane Escape with the color puzzle next to the door? You had to set 3 colors right in order to get a key.

This is how I did it - though there might be better ways, too :lol:
(Added it to the Advanced Tab of the Hotspot Properties of the first hotspot)

Code: Select all
Color1 = Color1 - 1
If Color1 = -1 then Action.LoadAPicture Hotspot(2), "blue.GIF"
If Color1 = -2 then Action.LoadAPicture Hotspot(2), "green.GIF"
If Color1 = -3 then Action.LoadAPicture Hotspot(2), "red.GIF"
If Color1 = -4 then Color1=0 : Action.LoadAPicture Hotspot(2), "black.GIF"

If Color1 = -3 Then
  ColorSet1 = 1
Else
  ColorSet1 = 0
End If


The hotspot is initially black, then changes to blue, green, red, and black again.
It must be set to red when it's correct, and in that case the variable ColorSet1 gets the value 1.

I did this with the other two hotspots in a similar way.

Then I went to the Hotspot Properties of the golden key, and set it so that the hotspot is only enabled if ColorSet1, ColorSet2, and ColorSet3 are all equal to 1.

But of course it's also possible to add an additional hotspot (a check button) that must be clicked after setting the colors, and then you can add to the Advanced Tab of the Hotspot Properties something like:
Code: Select all
If ColorSet1 + ColorSet2 + ColorSet3 = 3 Then
    Action.GoToFrame "Frame_Name"
Else
    Message "The code is wrong"
End If


There are different ways to set up such a puzzle, so you'll need to adapt the code to your own needs :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest