Text hidden until clicked..?

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

Text hidden until clicked..?

Postby mercedes » Wed May 07, 2008 6:10 pm

hi there..im in the middle of something now for a few days..was hoping for some help..

i have made a text box..and the user should type in answer ..but i want to make a HINT..

So i have written the word hint..by right clicking the screen..

but now i want the hint [text] ... to be hidden until they click the word "HINT"....Ive been told to make it an icon..but unfortunetly i only work with icon editor..and the words are big and blocky and diffucult to make them small..neat like..just words..

any ideas..?

I have full version..:)

many thanks in advance..:)
Last edited by mercedes on Wed May 07, 2008 6:27 pm, edited 1 time in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Wed May 07, 2008 6:19 pm

If you just need sort of an icon or button with "Hint" written on it, there are different ways.

You can for example use Paint or GIMP, make a small frame, add a background color, and use the writing tool to add "hint". Then just save the image (for example as .jpg), and then use this as hotspot image.

You can even look around on the internet for free online button creators, create one, and save it to your pc. Then again, use it as hotspot image.
Here is one example of such a free creator (you will need to add the link in the credits): http://www.buttongenerator.com/index.ph ... tor=button
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Wed May 07, 2008 6:23 pm

no i don't want a button..

i have written the word hint..thats ok..i just right clicked the screen and wrote that..What. i want is text to appear after they hit the word "HINT"..It stays hidden until they click the word.."hint"..I'm right sick of saying the word hint..hahah..:lol:

you know like you would see in a riddle maybe..do you know what i mean..i'm not very good sometimes at explaining..hmm
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Wed May 07, 2008 6:29 pm

Ah, I see, so you want a solution for the hint content.
Well, either you can just display a message when they hit the word "Hint", if the message is rather short.

Otherwise you can also create some sort of a note with Paint or GIMP.
Create a blank hotspot where you want that note appear (make it the same size as the note is), and add to the hotspot properties that is over the word "hint" something like
Code: Select all
Action.LoadAPicture Hotspot(HOTSPOT_NUMBER), "FILENAME"


Is this going into the direction that you've been thinking of, or am I still too far away from that?
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Wed May 07, 2008 6:35 pm

No i think this might be it..i will try it to see ..As for displaying a message..i don't want the message to appear at the bottom of the screen..i want it to appear right beside or under the word..here it comes "HINT" HA..

As for a hotspot appearing over the word hint..there is none..cause i right clicked the screen..but i guess that doesn't matter..

I will try this way right away and get back..:)..

Thanks for responding..~! And yes better word for it..solution for it..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Wed May 07, 2008 6:37 pm

Of course you need to create a hotspot over the word "Hint" ;)
Just draw a hotspot, and move it on top of it.

Yes, try it, and if you run into difficulties, just post here :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Wed May 07, 2008 7:08 pm

I suppose there is no way to make it in paint and make it so it doesn't appear like a piece of paper eh..? transparent would be better..:(

I can do the text..and i make it appear small but still a piece of paper behind it..and its white..try to colour it in..and it colours words..making most dissapear.didn't think this would be such a challenge..hah..but now i want it more than ever now....curse of mine.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Wed May 07, 2008 7:21 pm

If you have GIMP (I don't have Photoshop, but I assume it would work similarly), you can write a text, and make the background transparent. Then save it as .gif file.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Wed May 07, 2008 7:28 pm

Lyberdoggy almost has it..tis perfect..arrrggg.heres the code he gave me and it almost works only n ow the word dissapears..

[quote]If you want to create a text with the hint that appears after pressing a hotspot, create a text by right clicking and write "Text". Then go to frame properties and under advanced write this code:

Code: Select all
Code:
Text(1).caption=""



Code: Select all
Now go to the hotspot and add this code:
Code:
Text(1).caption="Your hint"



I want this to happen;

"HINT"--Click this and solution appear.

SOLUTION---HERE....its what should appear after hitting "HINT" [end of code is here.]

TWO HOTSPOT.
TWO TEXTS.. only one one should be visible. "HINT"--This word i right clicked and entered in..but it also has to be a hotspot.

So far this code works..only hint disspears for some reason..and is replaced with solution..litterally replaced.

Im pretty sure there should be a variable here..only I don't know how to write it in code..



I asked him this a few days ago as well..

I can't get over how diffucult this is turning out to be...good God..lol

I think i know why this isn't working..its because its showing up in the same hotspot..I have two to work with..not one..

This shouldn't be hard for most of the scripters on this site..OMG..LOL..

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

Postby cpkspikyhair » Wed May 07, 2008 11:07 pm

What I was thinking was to have this loaded at the beginning of the frame:

Code: Select all
Action.LoadAPicture Hotspot(TEXTHOTSPOTNUMBER), "TEXTPICTURE.EXTENSION"
Hotspot(TEXTHOTSPOTNUMBER).Visible = False
Action.LoadAPicture Hotspot(BUTTONHOTSPOTNUMBER), "BUTTONPICTURE.EXTENSION"
Hotspot(BUTTONHOTSPOTNUMBER).Enabled = True


Where TEXTHOTSPOTNUMBER, TEXTPICTURE.EXTENSION, BUTTONHOTSPOTNUMBER, and BUTTONPICTURE.EXTENSION are replaced with the hotspot number for the text, the picture of the text, the hotspot number for the button, and the picture of the button, respectively.

Then, under the Advanced tab of the Button hotspot, paste this code:

Code: Select all
Hotspot(TEXTHOTSPOTNUMBER).Visible = True
Hotspot(BUTTONHOTSPOTNUMBER).Enabled = False


Hope this helps!
PSPPC GameMaker!! Where you can find PSP and PC games up for download!
User avatar
cpkspikyhair
Games Page Administrator
 
Posts: 425
Joined: Thu Jun 28, 2007 1:49 pm
Location: On Mars (Yes There Is Water :) )

Postby mercedes » Wed May 07, 2008 11:17 pm

Thanks for replying..:)

The thing is I'm not working with any pictures or buttons..strictly text..ive tried working with pictures of text..and it looks ugly and appears huge..with a paper behind it..and even if i save as .gif..it still appears ugly..and paper behind..it >I could be doing this wrong though...but i've tried many different ways with text and it makes for an ugly look..:(

..................................................

I right click the screen...and enter text "HINT" this is --Also-hotspot---and visible..its in GReen.

Under it is more text "SOLUTION" Also a hotspot...not visible...Until HINT is pressed..That is..this is what i really want..ugh..

the code above works..there's just something small missing I'm sure of it..

Thanks though for all for help and I'll copy and paste it to have it either way..cause I"ll no doubt use it another time..:D

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

Postby cpkspikyhair » Wed May 07, 2008 11:26 pm

Ok. I didn't understand at first.

For the loading of the frame, put this in:

Code: Select all
Text(TEXTNUMBER).Caption = SOLUTION
Text(TEXTNUMBER).ForeColor = vbGreen
Text(TEXTNUMBER).Visible = False
Text(BUTTONTEXT#).Caption = Hint
Hotspot(BUTTONHOTSPOT#).Enabled = True


Where TEXTNUMBER is the index number of the solution, SOLUTION is the text for the solution, BUTTONTEXT# is the index number of the button text, and BUTTONHOTSPOT# is the index of the hotspot you draw over the Hint textbox.

Now put this into the Advanced tab of the Button hotspot:

Code: Select all
Text(TEXTNUMBER).Visible = True
Hotspot(BUTTONHOTSPOT#).Enabled = False


On the frame, make sure there are two textboxes and a hotspot over the "Hint" textbox.
PSPPC GameMaker!! Where you can find PSP and PC games up for download!
User avatar
cpkspikyhair
Games Page Administrator
 
Posts: 425
Joined: Thu Jun 28, 2007 1:49 pm
Location: On Mars (Yes There Is Water :) )

Postby mercedes » Wed May 07, 2008 11:44 pm

Code: Select all
LoadControl TextBoxObject(1)
TextBoxObject(1).Move 240*15,300*15,300*15,30*15
TextBoxObject(1).Visible = True

Code: Select all
Text(2).Caption = If you name this,you break it.
Text(2).Visible = False
Text(2).Caption = Hint
Hotspot(4).Enabled = True



Properties of the HINT TEXT PROPERTIES.

Code: Select all
Text(2).Visible = True
Hotspot(4).Enabled = False


This is what is in the frame properties..know that i have a text box as well on this same frame..there to type the solution..to the hint in it..In other words

HINT: this should beclicked
SOLUTION: This will appear. [If you name this..you will break it]

TEXT BOX: SILENCE user types this in

Now when i put this in my frame properties along with whats in the properties of the other iget a nasty error message..AND MY text box dissapears..im doing it wrong obviously..but at least now i see the word hint..yay..

I'm not really sure what to put for indexes..to be honest..first code ive ever done,,:(

On the frame, make sure there are two textboxes and a hotspot over the "Hint" textbox.


by the way why am i using two textboxes..?..i don't want another text box i have one for the actual answer..i only want this to appear as text..

is that what you mean..??
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby GM-Support » Thu May 08, 2008 1:51 am

Please find attached a project for Adventure Maker that should do what you described. I guess it is faster for you to look at how it works rather than to describe it to you.
Attachments
textbox_with_hint.zip
Project for Adventure Maker v4.4 or newer
(104.94 KiB) Downloaded 370 times
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby mercedes » Thu May 08, 2008 2:03 am

Which one am i opening here...folder that is..? i have text box with hint..

and then when i dbl click that..i get

areas
compoents
frames
icons..

a few more..

im not sure if my zip opens things right..everytime i try to unzip something, it always tells me windows cannot find program to open this file..ive tried to open with right programs..whatever..I can't open zip files i guess..Either way..doesnt matter.

I don't remember the last time Ive ever been so frustrated with something. I had no idea this was going to be such a difficult task..looked like it could be something pretty simple for an avid programmer. With the code Lyberdoggy left me..seemed simple enough..only it's missing something..what looked to be small enough.. I was soo wrong..Thanks anyways Kiddo..~

Seems everytime I want to put this software to challenge..I can never get it done..lol..If I do..takes dayss..The last challenge is still unsolved. Not for lack of trying on my part and the ONE poster who tried to help though..~

I was not meant to enjoy this software... :?
Last edited by mercedes on Thu May 08, 2008 2:50 am, edited 2 times in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby mercedes » Thu May 08, 2008 2:04 am

OMG..!! I actually figured this out..by myself..!! with the help of code though..~ Lyberdoggy's actually did it for me..I see now what he was missing..~


Right click the screen and have to write the word "HINT" too though for some reason..wouldn't work without doing so..So basically you are writing "HINT" in the code and on the screen..

In the frame properties this code.

Code: Select all
Text(1).caption="HINT"--actually have to put word in there.


Code: Select all
Text(1).caption="The hint"



That IS IT..OMG....LOOK at this thread..lol..

AND,,only one hotspot..~

Way to go Kid..~!..You are amazing...You have my heart felt gratitude for giving me the part that you did..I take credit though for figuring it out all the way..lol...jk..You are the MAN

.If that's what you meant for me to do in the first place..I misunderstood because of quotations had nothing in them in the example you gave me..Usually someone writes something in them Didn't expect to have to write the word TWICE...THANKS Pal....~!


Thanks for everyone else who attempted to help me as well too..~! REally glad this is figured out..~! No doubt..you guys are too.. :lol:
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby GM-Support » Thu May 08, 2008 12:04 pm

Glad you solved it.

Just for info, to open the file I have sent, just do the following:
1) Extract it on a folder on your hard disk
2) Launch Adventure Maker, click "Load Project", browser to that folder, and then click ok.
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby mercedes » Fri May 09, 2008 4:20 am

OHh..ok then..i wasn't extracting it to my C drive..and i know that ..duh..can't beleive i did that..I was so stressed out yesterday that I wasnt paying attention to where i was extracting it..

Thank YOu so much..!~..I will upload it again and look at it..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron