Need help with puzzle

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

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

Need help with puzzle

Postby mercedes » Thu Jun 09, 2011 10:45 am

Hey there..

This is my last puzzle..yayyy..!

I did this sort of neat effect...And I reallllly want to keep it..

I have a frame..and there are 12 Symbols/pictures..
They are on the frame--They are part of the frame-

I made transparent hotspots around all Symbols.

And in all of them is this..; Each hotspot number is different of course..

Code: Select all
Action.LoadAPicture Hotspot(2), "Symbol_2.bmp"
Action.CreateTimedEvent 1.0, "Action.LoadAPicture Hotspot(2), """""
framevar = Action.GetCurrentFrameName
GoToFrame framevar, 1.0, 1


It's neat..When the user clicks them..they go from the blacksymbol--which is the picture on the frame-- to another color-of the same symbol]---Back to the frame--with an alphablend..

It looks like the symbol is flashes on and off..Black--blue--Back to black.

The thing about this one is..the user can click them..and will most likely click each of them more than once..to see the color change..of each symbol..

So my question is this...

Although there are 12 symbols;

They only have to click 4 of them-[4hotspots]..The right ones..in the right sequence..Then they go to a different frame..

The other 8 pictures..do nothing..They flash only....

framevar is messing me up ..So I'm a bit lost as to how to do this....
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby reneuend » Thu Jun 09, 2011 1:14 pm

Depending on what affect you want after the user clicks on a correct hotspot you may need a variable for each of the 4 correct ones or just one variable under the 4 hotspots that gets incremented.

Lets say the following are the correct hotspots: 2,4,6,8

Under each hotspot you could do this:

Code: Select all
clicked = clicked + 1

if clicked >= 4 then
   ' success: go to new frame
else
    disable this hotspot so user can't increment "clicked" from it again
    reload this frame
end if



or you could have a special variable under each of these 4 hotspots:

Set global integers:
special_1
special_2
special_3
special_4

Under hotspot(2):

Code: Select all
special_1 = 1

if special_1 = 1 and special_2 = 1 and special_3 = 1 and special_4 = 1 then
    'success! go to success frame
else
    'reload this frame
end if


hotspot 4,6,8 would be the same as above but you would set their special_<num> to 1. So, hotspot(4) would have special_2 = 1 and so on.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Postby mercedes » Thu Jun 09, 2011 10:58 pm

Hey there..!~


The second code would almost do it...Only it goes to the frame..without the sequence...Simply if they click them..

..They can click others symbols in between..

I have this code in all four hotspots..Nothing in the other 8..

This is in one of the 4;

Code: Select all
Green = 1

If Blue = 1 and Red = 1 and Green = 1 and Yellow = 1 Then
   GoToFrame "Book_Glow", 1.0,1
Else
    GoToFrame framevar, 1.0,1
End If


I would like it so its like..click green, then red, then yellow, then blue..
All in a row..Then go to the frame..:D

If they don't click them in a row..nothing happens..
The way that code works..they can click them anytime..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby reneuend » Fri Jun 10, 2011 6:00 am

Remember how I did the sequence in the 6 button puzzle?

Each hotspot that you want to use in the sequence should have variable defined in the hotspot. In the button puzzle I used Keynum. Set the Keynum to a unique value for each of the hotspots.
example:
hotspot(1): keynum = 4
hotspot(3): keynum = 2
hotspot(5): keynum = 1
hotspot(12): keynum = 3

I picked varying hotspot indexes to show that I'm not relying on them to be in any sequence. We are using Keynum to create a unique value for each hotspot.

Now in the frame properties set a variable for the sequence.
example:
sequence = "3,2,1,4"


The sequence represents the order of keynums not hotspots.

Be sure to check the sequence under each hotspot.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Postby mercedes » Fri Jun 10, 2011 6:43 am

hey..

I put this..

This goes into hotspot(3)--It's the first button..to click in the sequence

keynum = 1

If keynum = 1 and Colors = "1,2,3,4" then
gotoframe
Else
reset frame
End if.

Frame's advanced..
Colors = ""

I also tried
Colors = "1,2,3,4"

It's not working....

This is assuming there is no procedure..

I tried it a hundred different ways..and other codes..and frankly..it's giving me a migraine..

There are a few sequence puzzles here...Only they are meant for numbers...keypads..ect...I tried them though...None of them are working for me..

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

Postby reneuend » Fri Jun 10, 2011 12:10 pm

Its not working because you aren't comparing the keynum location within the answer sequence. It will work if you use a counter for the hotspots that are part of the puzzle to check the sequence location of keynum. Define numclicks in the global variable area.

frame properties:
answer_sequence = "1,2,3,4"
numclicks = 0 'initialize

user clicks on hotspot(3)
Hotspot(3):

Code: Select all
dim keynum
keynum = 1

numclicks = numclicks + 1

if keynum = numclicks then
    if numclicks >= 4 then
        'puzzle solved
    else
        'passed this sequence entry,
        'but need to continue to solve rest of puzzle
    end if
else
    'failed this sequence
end if
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Postby mercedes » Sat Jun 11, 2011 1:59 am

Hey..Bob...

...I don't understand this code..I can't wrap my head around it...

It feels as though I'm counting the clicks on the hotspots....?..
Should that code be the same in each..hotspot..?

If i don't understand it..It's difficult for me to manipulate it....
I'm not quiet sure what you're saying here either..;

else
'passed this sequence entry,
'but need to continue to solve rest of puzzle



I might just leave it the way it is...and call it a bug..

As long as it gets them to the next frame..that being the last one..whatever type thing..

It's my own fault..I don't know what I was thinking to make another game..with no notes..or anything ..It being so long since i've done anything with it..I rue the day I picked up this cursed software..

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

Postby reneuend » Sat Jun 11, 2011 5:06 am

Send me your project and I'll fix it. Be sure to tell me the frame name!
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Postby Lyberodoggy » Sat Jun 11, 2011 3:01 pm

I 'd suggest simplifying things by using this code bob provided with a little change:

Code: Select all
if hs1en=1 then
    clicked = clicked + 1
    hs1en=0
    if clicked >= 4 then
       ' success: go to new frame
    end if
else
    clicked=0
    hs1en=1
    hs2en=1
    hs3en=1
    hs4en=1   
end if


Create the hs1en global integer as well as the hs2en hs3en hs4en (hs stands for hotspot and en for enabled). Remember to change the variable in each hotspot. Also you can go to each hotspot's variable tab and make it so it appears only if the respective variable is 1, but i'd suggest leaving it as-is so that the hotspots can be pressed again and cancel the sequence

then use the following code in the hotspots that should do nothing but flash:

Code: Select all
clicked = 0
hs1en=1
hs2en=1
hs3en=1
hs4en=1
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Sun Jun 12, 2011 12:54 am

Hey..

I have 12 colored symbols..

..I want to click 4 colored symbols in a row--The correct ones.


...However, I don't want the other 8 symbols to break up the sequence..of the four

If they click any other colored symbols in-between these..it shouldn't work..

Blue
Red
Green
yellow

In that order..

What's happening with this is;

I can click "Blue" "red" a different blue symbol..different red symbol..

Then go finish the sequence....Green, Yellow..or sometimes just one other hotspot..
Then it goes to the frame...so it's not working..:(

Also you can go to each hotspot's variable tab and make it so it appears only if the respective variable is 1,


I want them to see them..and click them as many times as they want..
Only, if they click the correct 4--in a row...It should- Go to a frame..
If not..nothing happens..they can clickclick a-way..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Gumbro » Sun Jun 12, 2011 8:10 am

If I got it right, you can do this without scripting.

Find the hotspots which must be clicked in order.

Make a integer variable for each hotspot. For example, variables could be called 'hotspot_blue', 'hotspot_red', 'hotspot_yellow' and 'hotspot_green'.

When the first (blue) hotspot is clicked, set the variable for that first (blue) hotspot to 1. For example set 'hotspot blue' to 1. This variable is used to check later if the hotspot has been clicked.

Then, open the properties of the next hotspot (red) in the sequence, and make it so that the (red) hotspot is only enabled if 'hotspot blue' is already set to 1. If the value is 1, it means it has been clicked. If the value of the 'hotspot_blue' is 0, it means it has not yet been clicked. Additionally, make it so that if this (red) hotspot is clicked, set the variable for this hotspot to 1. For example, set 'hotspot_red' to 1.

Continue in this manner, only enable the next hotspot in the sequence if a previous one in the sequence has already been clicked. Use the variable associated with the previous hotspot in the sequence to check if the previous hotspot has been clicked.

For the last hotspot in the sequence, just enable it if the previous hotspot in the sequence has been clicked, and have it 'Go to another frame'.

Note, it is also possible to have the entire sequence reset if an incorrect hotspot is pressed in the middle of the sequence. This can be done without scripting.

If this is a bit confusing, I can make a tutorial with pictures. Just let me know.
User avatar
Gumbro
Active Member
 
Posts: 88
Joined: Thu Oct 05, 2006 7:33 pm

Postby mercedes » Sun Jun 12, 2011 9:32 am

Hi Gumbro..Thx for response..:)

I know the variable tab would most likely work..But the thought of making 12 variables..and resetting each variable..in 12 hotspots..Is ugh....

I get confused with variable tab..with more than 4hotspots....I always did..I hate the variable tab..lol..

I'm ok when I'm doing it...at that minute..

But if something should not work right...I start going crazy with it...Then when i open my project again..It looks all the more confusing to me....

It's been so long since I've opened AM..well over a year..Maybe even 2?..
It is not like riding a bike.....you really have to stay with it..I do..

*****************
I don't know if you read the thread of the puzzle Pinto suggested to me..with the colored books and underlined words..
The statue holding a book with colors on it..

That's what this is...Only instead putting of a bunch of words in the Golden book..I used symbols to represent the underlined words..and a bunch of other symbols....

Thread can be found here; There is a picture down near end of post..
http://www.adventuremaker.com/phpBB2/viewtopic.php?t=6085
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Gumbro » Sun Jun 12, 2011 10:12 am

In order to click 4 hotspots (the four colored symbols you were referring to) in the correct order, you only need to make 4 hotspots. One for each.

The others, incorrect ones, 8 of them, do nothing, right? So you don't have to make hotspots for those. If the player clicks one of those, nothing happens, so no hotspots are needed.

Or did I get it wrong?

Anyways, just keep your sequence and relevant variables on a piece of scrap paper. Make the first two hotspots in the sequence to get the hang of it, and test that they work as they should. Only then make the rest.
User avatar
Gumbro
Active Member
 
Posts: 88
Joined: Thu Oct 05, 2006 7:33 pm


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron