Puzzle

This forum is meant for discussing how to create pictures, sounds, and videos. You can also post technical questions about how to use a particular program (Poser, Lightwave, etc.).

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

Puzzle

Postby mercedes » Thu Oct 16, 2008 12:41 am

Hi there..:)

i am attempting to make a puzzle..jigsaw one like..But the only thing i can ever find... is u can make one...but i can only display it on my website or the website i make it on..I'm unable to use it on my pc..have access to it..the pieces..

So i 'm wondering if any one knows of way to either gain access to one..via online..download..and actually use the pieces..not just play it..

Or

The code they give me is to imbed as html on my website..If i put a link to my website in my game..Can they play it like that?..and then some how resume in the game..

See the user is to put together a puzzle on a table in my game..so..i'm not sure if that would do any good..bringing them to my website..

Other than that..I have no idea on how to make one..:?..make pieces that they can put together..i mean other than it being square..


I found some that u can create .exe with..so if i use action open exefile..how do they get back to the game..? after being in the other puzzle game...--not sure if this is the answer..:?
THanks For Input..:)

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

Postby Lyberodoggy » Thu Oct 16, 2008 8:46 am

You know my answer... flash.

You can't work with non-square objects in AM...

I'll try to think of a workaround, but I don't believe there really is one.
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

jigsaw puzzles

Postby marina » Fri Dec 26, 2008 6:49 am

Hi mercedes and Lyberodoggy!

I'm here with a question again, but it looks like I already got the answer:

"You can't work with non-square objects in AM..."

In my project the gamer should find an useful map, but torn in pieces, and would have to rebuild it as if it was just a jigsaw.
Reading Lyberodoggy's reply I assume that there's no chance to do it with AM
(I already upgraded to full edition).
Do you have any suggestion or should I change my project?

Thanks for your attention, have a nice day everybody :D
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby mercedes » Fri Dec 26, 2008 7:18 am

Yes you can do this--so to speak....I think what..Lyberodoggy means..that you can't make irregular shaped "hotspots"..But you can use gifs and such..for items..of irregular shapes[or icons]..although i don't myself recommend jigsaw pattern..persay

As for a jigsaw[puzzle type] I'm attempting the same as what you are doing..with a paper....:D..But i'm going to try it with a ..plugin that you can get for AM..I"ll let you know how that works..:P..I've yet to try this..but will be within the next day or so..If this works..I'll let u know for sure..:D


Also u can try flash..If your handy with it....

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

Postby marina » Fri Dec 26, 2008 8:19 am

Wow! Thanks for your fast reply mercedes :D
Unfortunately I'm not handy at all with Flash... I'm totally new to this field. I work as a graphic for printed magazines, using Photoshop for high resolution 2D CMYK images, so you can see how unfamiliar I am with all the tools destined to web and videogames.

I was fascinated by the game of two Swiss guys, "I misteri di Maggia", and that gave me the idea of creating a game of my own using photos.
I'll show you what I would like to do attaching a picture. I actually printed the map on strong paper, tore it in pieces and threw it in a fountain; then I collected the pieces, dried them and now I'm going to scan them separately to make transparent gifs to use as objects in the inventory for the gamer to reassemble them.
But, as i'm a bit crazy :shock: I projected it all before knowing wether it was possible to realize or not :oops:
Of course I will change my project if it is not... before reading your reply I was considering the idea of making a slider puzzle of it with square tiles.

Now I will wait for your attempt with the plugin, I'm not in a hurry for this... I have so many things to do for this game... I'm afraid that, having little time out of work, it will take me one year or more... :?

Looking forward to your news, good luck! :wink:
Attachments
map in pieces.jpg
map in pieces.jpg (53.04 KiB) Viewed 26495 times
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby Lyberodoggy » Fri Dec 26, 2008 6:15 pm

you can add gif transparency to the parts that aren't actual paper... the bad thing is that you will be able to click the transparent parts too...
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby marina » Fri Dec 26, 2008 6:33 pm

Thanks Lyberodoggy!
If I understood it right, the transparent part would anyway belong to the tile itself and the contiguous pieces would never fit properly but just side by side of their square or rectangular shape (sorry for my horrible english... I hope that it's clear enough :oops: )
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby Lyberodoggy » Fri Dec 26, 2008 6:35 pm

It is.
well the transparent parts will just not be visible. You can however overlap the hotspots with each other so that they will be joined...
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby pennsteve » Fri Dec 26, 2008 6:40 pm

With flash you need to know some programming I think.
pennsteve
Expert Member
 
Posts: 329
Joined: Wed Aug 06, 2008 3:55 pm

Postby marina » Fri Dec 26, 2008 6:51 pm

That's an idea! :idea: Great! So, I could make hotspots' size going from the innermost edge of the left tile to the innermost edge of the right tile, just to cover all the missing space between.
I'm going to experiment and I think that it's very likely I'll have more questions afterwards... :D
Thanks!

pennsteve wrote:With flash you need to know some programming I think.


I think so either pennsteve! And I do not know anything nor about programming neither about Flash...
It seems to me that the only thing I'm very good at is having complicated and hard-to-realize ideas :lol:

Please edit your posts.Mod

Right. Sorry, I'll pay attention next time!
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

another question

Postby marina » Thu Jan 22, 2009 2:11 pm

After a pause due to my work I?m back on the jigsaw project and I wanted to try the technique that Liberodoggy suggested. But for my inexperience I?m at a dead-end.
Now I have a black frame with nine overlapping hotspots containing each a piece of the map (in transparent gifs) that fit perfectly. I can move and drag them throughout the entire frame and even pile them up in a bunch, but... I can do it all in the frame editor; obviously if I test the frame the hotspots are stuck just as I left them. How can I enable the gamer to do the same thing during the game???
And, eventually, How could I give the gamer the possibility to rotate the pieces clicking the mouse?
If with your help I'll be able to realize the puzzle I'll post a thorough tutorial in the forums.

Another separate question is:
is there a way, having performed some action such as dragging an object onto a hotspot, to result in having more than only one single object in your inventory at the same time?

Thanks a lot in advance for replying!
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby Mystery » Thu Jan 22, 2009 6:26 pm

Hi marina,

Unfortunately you can't create draggable hotspots. You can only drag items from your inventory onto objects.

Hotspot movements can be imitated by moving the hotspot.
Rotation of hotspots can be imitated by loading the image in different positions (for this, you need to import images of the different positions into your AM project).

Of course more than 1 item can be picked up by clicking on a hotspot or by dragging an item from the inventory onto a hotspot - depending on what you wish to do, you might need to use VBScript.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby marina » Thu Jan 22, 2009 9:40 pm

Thanks Mystery! I get the point.
I'm afraid I need to become much more familiar with VBS before attempting to create complex puzzles (in this case much more complex for me to create than to solve for the gamer :cry: )
I red carefully the code for the slider puzzle to see if I could in some way adapt it to my particular need but I have to say that I'm still inadequate to such a task!
For the moment I printed Chromegloss tutorials as well as the others on scripting and will spend some time studying.

Edit: for what concerns my last question, I just saw that it's the second technique in Chromegloss list.
Thanks everybody for the great work you make to be helpful!
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby Mystery » Thu Jan 22, 2009 10:00 pm

No problem Marina :)
I wouldn't be able to create a slider puzzle myself either. If you post your idea, maybe one of our VBScript geeks can help you :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby juhuwoorps » Thu Jan 22, 2009 10:50 pm

Mystery wrote:Hi marina,

Unfortunately you can't create draggable hotspots. You can only drag items from your inventory onto objects.


This is not quite correct.
If you are using keyguard you can make something like draggable hotspots :)

Have a look at this:
http://www.swuttig.de/games/draggable_hotspot.zip
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Mystery » Fri Jan 23, 2009 1:04 am

Thanks for the correction juhu!
Seems I'm a bit behind :oops:
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby marina » Fri Jan 23, 2009 7:19 am

Thanks to both of you! :D

The "Draggable hotspots" is exactly what I need Juhuwoorps!!! It's a setup, so I can't examine it as a AM project.
Maybe I should write the author for asking to buy his code? I'd really do anything to have that possibility!


Replying to Mystery, 'I'll try to explain as clearly as I can what I have in mind.

At the beginning of the gameplay you enter a building with a garden and a fountain inside, and you have clues to find precise places in that garden. But to do so you need a map, and I didn't want it to be so cheap as just finding it somewhere; so I thought of tearing it in pieces and throw them in the fountain (I posted the picture above) and let the gamer compose a simple jigsaw puzzle in 9 pieces to have the complete map and be enabled to detect directions.
Following Liberodoggy's suggestion I saved the pieces as transparent gifs and inserted them in nine hotspots; as you can see from "map 1" they fit perfectly together! I was so happy that overlapping the hotspots worked so fine that I totally forgot that I could drag them because I was "on the other side" of the game :oops:

My idea was that after having picked up the pieces in the water and dragged them as a single item from the inventory onto a hotspot on the edge of the fountain, the gamer would go directly to a frame such as "map 2", where the pieces are piled and messed up and it's up to him having to drag every piece where it belongs as in "map 1". After solving the jigsaw the entire map would be stored in the inventory, to be magnified on the lens at every need.

(Sorry, I can't post the images not even in very small size. Every time I try I get this message:
"Sorry, but the maximum filesize for all Attachments is reached. Please contact the Board Administrator if you have questions.")

P.S.:
I hurried a bit in editing my last post: in Chromegloss tutorials , technique #2 is for adding multiple copies of the same item and not multiple different items. I tried to repeat the script for adding one item for each item I wanted to add at the same time, but I got an error message, so it must be wrong. I wrote:
Action.AddItem"Item name":Action.AddItem"Item name":Action.AddItem"Item name" etc...
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby mercedes » Fri Jan 23, 2009 1:04 pm

Hi there...:D

For pictures u are allowed 5...and they can't be .bmp
********************************************************
That code looks right..:? for adding items..

Action.AddItem "Itemname" : Action.AddItem "Itemname": Action.AddItem "Itemname"

did u have it all on one line..? Whats the error message u are getting..


*********************************************************
As for the puzzle..drag and drop puzzle..sounds like u want to have the map put together over an existing map..? basically fill in the pieces..THey have to put them in their right places..? Just wondering if thats what it is..Also u need keygaurd for the real effect..and use Hotspot.move method..that thread is here somewhere..I think its called Drag and DRop..You have to play around with coordinates for hotspot.move

Also would a jigsaw serve your purposes as well..? A real jigsaw puzzle the player could put together..Cause there are some online u can download for free and will create executables..Although they look like jigsaw though..actual puzzle pieces..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Fri Jan 23, 2009 1:15 pm

Juhuwoorps, nice sample there... did you use the idea with Keyguard and Hotspot.Move to current coordinates?

Also you should create a limiting hotspot because now, if you get out of the window, the hotspot you drag stays there
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby marina » Fri Jan 23, 2009 3:38 pm

Hi Mercedes!:D
Thanks for your reply. I don't remember in detail the text of the error message but later I'll write the code again and will report you what it says exactly. Anyway I tried all in one line and in separate lines as well...

mercedes wrote:As for the puzzle..drag and drop puzzle..sounds like u want to have the map put together over an existing map..? basically fill in the pieces..THey have to put them in their right places..? Just wondering if thats what it is..


Not just as you write... it's a shame that I cannot post the small-sized screenshots I had done to explain better (I'll try again after having written). They showed clearly the issue.
Anyway, I created a black frame with the hotspots containing the pieces all piled up; the player would have to drag them around in order to be able to see their shape (but WITHOUT having the entire map as reference - anyway, only nine pieces it's not hard at all) and reassemble them correctly. That's all...

mercedes wrote: Also would a jigsaw serve your purposes as well..? A real jigsaw puzzle the player could put together..Cause there are some online u can download for free and will create executables..Although they look like jigsaw though..actual puzzle pieces..


I don't think it would suit this special case, because I would like a realistic effect, but I'd love the possibility of using it somewhere else. Is that possible for you to post the links?

Thanks a lot for the "drag and drop" hint! I found it and all the related topics. I also downloaded Keyguard and think I'll have a lot to study since now on :roll:
Tonight I'll edit my post writing the content of the error message... maybe it can give some idea to help me.
By for now
:D
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby juhuwoorps » Fri Jan 23, 2009 4:16 pm

@ lybero
I know the the bug of dragging the hotspot out of the window.But this is just an example that it is possible to drag hotspots
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby mercedes » Sat Jan 24, 2009 1:51 am

Hi there...:D

Thanks for your reply. I don't remember in detail the text of the error message but later I'll write the code again and will report you what it says exactly. Anyway I tried all in one line and in separate lines as well...


If you want..u can copy and paste the code i wrote up there..and that should work..just put in names of course..Also when putting in the names of the items..put them as is..there are no exentions. It's exactly as written if u look at your manage inventory items[what u named them] Not what AM named them....so if its "key" then its "key" or "magnifying glass" then that's what it is..Another tip..Make sure its in your Manage Inventory items..if u have yet to add it in there..u will get an error message as well..I'ts not enough for it to be in the list of icons and cursors..:)

To post pictures..make sure its one at a time...jpg image is best..and only 5 per post- 1 per attachment..where u hit "browse" hope that helps..:?

possible for you to post the links?


Here is one Jigsaw Maker..that is free..If u find more..please post as well..lol..I saw some, but this was the only one that looked totally free and easy to use..

Jigsaw Maker

I also downloaded Keyguard and think I'll have a lot to study since now on


KeyGuard is fun..and u can do ALOT with it..its just a matter of having an imagination for it..Also don't look to hard at it..Looks more complicated than what it is..;) I looked hard into it myself when i first used it..lol..I still do..then when something works out..I have to laugh at how hard i looked into it...lol..and how easy it was to use..Trial and error i guess..:P


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

Postby Imari » Sat Jan 24, 2009 3:25 am

I tried to do something similar once using Riobros' keypad code. My method is clunky, but perhaps it will give you an idea. Mine were chips with symbols on them that needed to be place correctly on top of a box, but I think it's a similar idea. It's been a long time since I used AM, so bear with me...

I made each piece as a separate inventory item. One had to find and pick up each piece to get it added to the inventory. Dragging the magnifying glass over the item in inventory gave you the "close-up view".

On my "reassembly" frame, I made six hotspots with a JPG of each of my pieces correctly placed. I created variables for each hotspot --- the JPG on the hotspot was only visible IF the variable for that hotspot was 1. Each corresponding inventory item --- when correctly placed --- would set the variable to 1. So instead of dragging hotspots to the correct place, you're dragging the inventory icon.

In the Advanced tab for each I think you'll have to add VB script that says something like --- IF chips 1-9 =1 then GoToFrame "Completed map" --- so that it checks each time an item is placed to see if all the other variables have also been switched to 1. You'll also want to have the script remove all the invenotry items for the chips when all the pieces are correctly placed (variables all set to 1). You may want to make a "reset" in case the player backs out of the frame without completing the puzzle.

You then make the frame "Completed map" with a picture of the correctly assembled map, making the map a gettable item with an inventory item and close-up view all its own.

Unfortunately, I don't think that Riobros' keypad demo exists here anymore, but perhaps if this idea suits you, one of the VBS script wizards in the forum might be able to help you. I think Mystery and Shadowhunter once posted about something similar too... a lock maybe?

Best of luck.
User avatar
Imari
VIP
 
Posts: 872
Joined: Fri Jun 20, 2003 4:49 pm
Location: Virginia, USA

Postby marina » Sat Jan 24, 2009 7:18 am

I feel so stupid Mercedes! Of course it didn't work... The code was right but I wrote it in the Advanced tag of the hotspot properties and not in the dialog window that opens when you drag and drop the item onto the hotspot while managing inventory items... sorry to have wasted your time!
Everything in AM is new and unfamiliar to me, and so many things to learn and keep in mind!

mercedes wrote:To post pictures..make sure its one at a time...jpg image is best..and only 5 per post- 1 per attachment..where u hit "browse" hope that helps..:?


Yes, this is just what I did, one at a time. And some posts above I had already attached an image successfully. I'll try again...

Thanks a lot for the jigsaw maker address! I love jigsaw puzzles. I think you already know the site called JigZone.com; you can have much fun there, but they don't give any tool to create jigsaws out of the site.


mercedes wrote:..Trial and error i guess..:P

This is exactly how I'm going on for the present! Maybe it will take me a couple of years, but I really DO want to develop the game I have in mind!
Thanks for everything Mercedes! :D

@Imari
That's great, genial!!!
Your procedure sounds (at least apparently) simple enough up to the point I'll try to realize it myself... well, I have to learn! In the case I wouldn't manage to I'll shout for help.

Thank you so much Imari! I will let you know the outcome of your precious suggestion. And thanks for the luck wish... I think I'll need a lot!
:wink:
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby marina » Mon Jan 26, 2009 1:24 pm

Me again,
I?m working on the puzzle and I tried first Imari?s technique that sounded simpler for a beginner like me. I succeded in everything exept the most important: write a valid code in the advanced tab of every hotspot to let be checked if all pieces were correctly placed and go directly to the frame showing the assembled image (and adding it as an item to the inventory), as Imari stated.

Two things are not clear to me: what to write and where to write it (I mean in the advanced tab of the proprerties of which hotspot ? to me, by logic, it should be written in the hotspot containing the gif images, but I also tried any other possibility, so it must be the sintax to be wrong)
This is the code: If"mappa1"=1,"mappa2"=1,"mappa3"=1,"mappa4"=1,"mappa5"=1,"mappa6"=1,"mappa7"=1,"mappa8"=1,"mappa9"=1ThenAction.GoToFrame"mappa giardino"

Mappa1 to 9 are the names of the variables; I tried to separate then with colon, but I think colon is only to separate actions, I tried with commas, as in the sample above, and I tried with nothing, just writing the names one after another.. No way, it does not work. So it must be the wrong code or the wrong place? or both.

I already wrote a complete tutorial to post (obviously for beginners like me) on how to create this sort of puzzle, together with a sample project to be examined within AM. I only miss this? er? little detail. Would someone be so nice to tell me what?s wrong? Next I?ll try to accomplish the same thing, or similar, through juhuwoorps technique, using Keyguard to try reproduce his "Draggable hotspots". Surely the graphic effect will look different and I will choose the best looking one, but I'm very interested to get a bit acquainted with the procedures.
Thanks a lot!
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby mercedes » Mon Jan 26, 2009 1:39 pm

HI there...Im done making this puzzle and I will share a t utorial on it..in the Tut's section..:D Thanks to Juhu...This puzzle is done..woohoo..I'm just adding a few dynamic effects to it[Sound and some images to make it look neat ..like a real puzzle]..I had one in mind when i first started thinking about it..so i'ts based on that one....but the puzzle works and is really cool..!~
Again Thanks Juhu..:D

Give me a day or so here..to finish the rest of it...:D..

EDIT*

to have variables equal to one in the same line..its writtten with "ands" or the ampersand--[Think thats how it spelled..lol] symbol..:D

So it looks like this..;

If mappa1 and mappa2 and mappa3 = 1 Then
Action.gotoframe "Framename"
End If

or

If mappa1 & mappa2 & mappa3 =1 Then
Action.gotoframe "Framename"
End if

Peace
Last edited by mercedes on Mon Jan 26, 2009 2:43 pm, edited 1 time in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Mon Jan 26, 2009 1:57 pm

The code should go in a "Checking" Hotspot, a hotspot that will be pressed when the puzzle is completed.

Your syntax is wrong, you van fix it like this:
Code: Select all
If mappa1=1 AND mappa2=1 AND mappa3=1 AND mappa4=1 AND mappa5=1 AND mappa6=1 AND mappa7=1 AND mappa8=1 AND mappa9=1 Then Action.GoToFrame "mappa giardino"


OR like this:
Code: Select all
wrong=0
For i=1 to 9
Set X=Getvariablereferencefromname("mappa"+cstr(i))
If X.Value<>1 then wrong=1
next
If wrong=1 then Action.Message "Wrong" else Action.Gotoframe "mappa giardino"
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby marina » Mon Jan 26, 2009 2:06 pm

Thanks mercedes!!! :D
I'm feeling stupid enough... wonder why I had the idea that something so normal could't work in a code... :oops:

or the ampersand--[Think thats how it spelled..lol] symbol..Very Happy

:lol:

I'm looking forward to your tut! Hopefully in a short time I'll be able to share mine (for beginners only) in the tut section :D

Edit:
@ Lyberodoggy
Thanks a lot for your help as well! Your tip on overlapping transparencies some posts above was essential to realize the puzzle in this form!
Last edited by marina on Mon Jan 26, 2009 2:10 pm, edited 1 time in total.
I'm fond of Rhem-like games!
User avatar
marina
Member
 
Posts: 44
Joined: Sun Nov 23, 2008 8:27 pm
Location: Rome

Postby mercedes » Mon Jan 26, 2009 2:08 pm

Really..I've used what i wrote many times..but then again i was just writing if any one of those are equal to 1....I was looking at what marina..was trying to code..:D

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

Postby Imari » Mon Jan 26, 2009 10:31 pm

I think Mercedes tutorial will be very helpful and will specifically answer your question.

In the meantime, I have found my copy of Riobros76's tutorial for the "numerical keypad puzzle". I think we lost it when the forums were hacked a couple of years ago. Reading it over, I'm not even sure it's the tutorial that I used.... :roll: .... anyway, posting it here since parts of it may be helpful to you or others in the future.

NUMERICAL KEYPAD PUZZLE from Riobros76's example -

This puzzle uses an image of a keypad with nine numbered keys and an enter key. The code must be entered in order before the enter key is pushed or else an "access denied" frame is reached. If the numbers are pushed in the correct sequence, the "puzzle solved" frame will be reached.

The correct keypad code for this example is -->1,2,3

1. From the Project Menu list, left of screen, select the "VBS Variable" option and add a new integer variable for each of your buttons on the pad. In this case T1, T2, T3... T9, and Enter.

2. From the Project Menu list, left of screen, select the "VBS Procedures" option and add:

Code:
'ROSARIO SANCETTA CONTROLLER
Sub Controller()
If T1=1 AND T2=1 AND T3=1 and Enter=1 THEN GoToFrame "Solid05"
If T0=1 OR T4=1 OR T5=1 OR T6=1 OR T7=1 OR T8=1 OR T9=1 THEN GoToFrame "INITIALIZE"
End Sub

The top line means - If buttons T1 and T2 and T3 and Enter have been pushed in that order, then go to the "Solid05"/puzzle solved frame (open door, lit up keypad, or whatever). If any other key has been pushed, go to "INITIALIZE" (= the "access denied") frame.

2. Create a new "blank frame" and name it. This will be your "reset puzzle" frame if thw wrong code is entered. For this example, this frame is named "INITIALIZE". On the blank frame, create a hotspot and select the image of your keypad for it.

Frame Properties Tab -->
[check] Enable Timer...
Seconds 1
Destination Frame "Solid01"

Audio Tab -->
Play a short sound that indicates "access denied" or "error"
Fade duration 2 seconds.

Advanced Tab -->
[check] Execute a VBS script immediately.... etc.
Add this Code:
T1=0
T2=0
T3=0
T4=0
T5=0
T6=0
T7=0
T8=0
T9=0
T0=0
ENTER=0

3. Create a new "blank frame" and name it. For this example, this first frame is named "Solid01". On the blank frame, create a hotspot and select the image of your keypad for it. Place the keypad in exactly the same position as you did in the "INITIALIZE" frame.

Create a new hotspot over each of your numerical keys. For each hotspot, set the variable to switch from 0 to 1 when the hotspot button is pushed by selecting the variables tab and select -
[check]Change the value of one or more variables when the user clicks this hotspot.
Variables to 0 -
(none)

Variables to 1 -
T1 //or whatever hotspot key you are over.

On the General tab, change the cursor for each hotspot.

On the Audio tab for each hotspot, add a sound for sound of the button being pushed.

4. Create a hotspot over the "Enter" key. Set the variable to switch from 0 to 1 when the hotspot button is pushed by selecting the variables tab and select -
[check]Change the value of one or more variables when the user clicks this hotspot.
Variables to 0 -
(none)

Variables to 1 -
Enter

On the Advanced tab add this code -->
If T0=1 OR T4=1 OR T5=1 OR T6=1 OR T7=1 OR T8=1 OR T9=1 THEN GoToFrame "INITIALIZE"

This means that if any key other than 1, 2,or 3 (your combination) has been pushed, go to "the access denied" frame.

On the Audio tab for the hotspot, add a sound for the sound of the enter button being pushed.

On the General tab, under Hyperlink, check "Go to Another Frame" and select your "INITIALIZE" frame.

5. Duplicate this frame three more times. For this example the original frame is named "Solid01" and these duplicate frames are named "Solid02", "Solid03", and "Solid04".

6. Open frame "Solid01" and open the Hotspot Properties (right click) for the first number of the code, in this example key #1. On the General tab, under Hyperlink, check "Go to Another Frame" and select your "Solid2" frame.

7. Open frame "Solid02" and open the Hotspot Properties for the second number of the code, in this example key #2. On the General tab, under Hyperlink, check "Go to Another Frame" and select your "Solid3" frame.

8. Open frame "Solid03" and open the Hotspot Properties for the third number of the code, in this example key #3. On the General tab, under Hyperlink, check "Go to Another Frame" and select your "Solid4" frame.

Open the Hotspot Properties for the "Enter" key. Open the Advanced tab and remove the code there, just erase it.

9. Open frame "Solid04" and open the Hotspot Properties for the third number of the code, in this example key #3. On the General tab, under Hyperlink, check "Go to Another Frame" and select your "Solid4" frame.

Open the Hotspot Properties for the "Enter" key. Open the Advanced tab and replace the code that's there with the single word "Controller".

10. Create a new "blank frame" and name it. This will be your "access granted"/"puzzle solved" frame if the correct code has been entered. For this example, this frame is named "Solid05". On the blank frame, create a hotspot and select the image of your keypad for it. For this frame you may want to have the key light up or something to indicate "success".

Frame Properties Tab -->
[check] Enable Timer...
Seconds 1
Destination Frame "****"

Replace *** in the last line above with the name of your open door frame or box opened frame or whatever the keypad opened.

Audio Tab -->
Play a short sound that indicates "access granted" or "success".
Fade duration 2 seconds.
User avatar
Imari
VIP
 
Posts: 872
Joined: Fri Jun 20, 2003 4:49 pm
Location: Virginia, USA

Next

Return to How to make pictures, sounds, and videos

Who is online

Users browsing this forum: No registered users and 0 guests

cron