Question and answer quiz

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

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

Postby pennsteve » Sat Aug 09, 2008 10:35 am

Mystery wrote:Making the others invisible might not be a good idea if it's a puzzle ;)

I would rather suggest to set the variables back to 0 if the player clicks the wrong color.
Gonna see if I can give you sort of a tutorial a bit later :)


Yeah, a tutorial would help because I have no idea what you mean.

OK, the tutorial from AM said to make 2 variables.......it didnt say WHERE to make them, so I did it in frame properties because thats the only place I found.......it says I can create a new integer variable or variant variable........im lost. I created 2 integer variables. Does this matter? I guess I should have used variant? Wait, I just tried variant and it says I must use an integer variable. So I was right the first time. Oh well.
pennsteve
Expert Member
 
Posts: 329
Joined: Wed Aug 06, 2008 3:55 pm

Postby Mystery » Sat Aug 09, 2008 10:39 am

Yes, you need to use integer variables. :)

Have some patience, after lunch I'm gonna make something for you :)
Last edited by Mystery on Sat Aug 09, 2008 10:39 am, edited 1 time in total.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby pennsteve » Sat Aug 09, 2008 10:39 am

mercedes wrote:*EDIT*..sorry reread what u wrote..:OOPS:

Its like this..

In the V-TAB of RED...make it equal=1 the other 2= 0 above it..
Then in YELLOW V-TAB make it =1 and Green = 0 above it..

THen in Green V-TAB Make it= 1 and go to next frame is checked off..


I find it easier using VBS script..myself..sometimes..:lol: and hard to do from memory...lol..

I'm gone for a bit..but i'll be back later on..If Mystery is still here..she'll help..:)


Peace~
Other 2? Wait a minute. The AM tutorial said to only make TWO variable for the 3 switches. I was only using 2 variables. Was this wrong? Also, you are saying set IT to 1, set IT to 0 etc........I dont know which variable you mean, 1 or 2.


Here is what I did......straight from the help files......

1. Create 3 hotspots, one for each switch;
2. Create 2 variables (let's call them var1 and var2);
3. Change the properties of the first hotspot (the one that the player has to click at first) so that the value of var1 becomes 1 and the value of var2 becomes 0 when the player clicks on the hotspot;
4. Change the properties of the second hotspot so that the value of var2 becomes 1 when the player clicks on the hotspot;
5. Change the properties of the third hotspot so that it is enabled only if var1=1 and var2=1;
Now the third hotspot will be enabled only if the player has clicked on the first two hotspots in the right order. To make the door open, go to the properties of the third hotspot, then select "Go to another frame", and then select a frame in which the door is open.

I just went and checked it, and its still doing it the right way....red, yellow, green..........but its also triggering the hotspot with yellow, red, green, yellow, green. Do I need 3 variables to stop this from happening?
pennsteve
Expert Member
 
Posts: 329
Joined: Wed Aug 06, 2008 3:55 pm

Postby Mystery » Sat Aug 09, 2008 11:27 am

Since "green" is disabled, the click on it won't be registered, this is why the order that you've posted, still works.


I would do it like that (although there are other solutions aswell):

I've made 2 integer variables:
red, yellow
(you can call them differently, it's your choice; if you use different names, you must replace the names in the codes)
The player has to click in this order: red, yellow, green.

In the red hotspot, add this to the Advanced Tab of the Hotspot Properties:

Code: Select all
red = 1
yellow = 0


(Red is the first hotspot that must be clicked by the player)

In the yellow hotspot, add this to the Advanced Tab of the Hotspot Properties:

Code: Select all
If red = 1 Then
  yellow = 1
Else
  yellow = 0
End If


(Yellow is the 2nd hotspot that must be clicked. The click on it should only count, if red has already been clicked, otherwise yellow must remain 0)

In the green hotspot, add this to the Advanced Tab of the Hotspot Properties:

Code: Select all
If red = 1 and yellow = 1 Then
  Action.GoToFrame "Frame_Name"
Else
  red = 0
  yellow = 0
End If


(if the player has already clicked red and yellow, the puzzle is completed by the click on green, and the player can go to the next frame.
If red or yellow have not been clicked yet, or the player has clicked them in the wrong order, the player has done it wrong, and therefore red and yellow must become 0, and the player has to "start over" with the puzzle).


Please test this code, and let me know if there's still something wrong :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby pennsteve » Sat Aug 09, 2008 5:33 pm

Mystery wrote:Since "green" is disabled, the click on it won't be registered, this is why the order that you've posted, still works.


I would do it like that (although there are other solutions aswell):

I've made 2 integer variables:
red, yellow
(you can call them differently, it's your choice; if you use different names, you must replace the names in the codes)
The player has to click in this order: red, yellow, green.

In the red hotspot, add this to the Advanced Tab of the Hotspot Properties:

Code: Select all
red = 1
yellow = 0


(Red is the first hotspot that must be clicked by the player)

In the yellow hotspot, add this to the Advanced Tab of the Hotspot Properties:

Code: Select all
If red = 1 Then
  yellow = 1
Else
  yellow = 0
End If


(Yellow is the 2nd hotspot that must be clicked. The click on it should only count, if red has already been clicked, otherwise yellow must remain 0)

In the green hotspot, add this to the Advanced Tab of the Hotspot Properties:

Code: Select all
If red = 1 and yellow = 1 Then
  Action.GoToFrame "Frame_Name"
Else
  red = 0
  yellow = 0
End If


(if the player has already clicked red and yellow, the puzzle is completed by the click on green, and the player can go to the next frame.
If red or yellow have not been clicked yet, or the player has clicked them in the wrong order, the player has done it wrong, and therefore red and yellow must become 0, and the player has to "start over" with the puzzle).


Please test this code, and let me know if there's still something wrong :)


Thank you. I did this but it will still advance to the next frame if I use the combination of yellow, red, green, yellow, green.

I had a six color box in my other game. What I did there was create six frames and put a hotspot to advance on each frame on the right color. All other colors, if clicked out of order, made the player exit and start over. I guess I could do this with a switch too. If they click the first one out of sequence it would just take them back to that same frame they are already in. :wink:
pennsteve
Expert Member
 
Posts: 329
Joined: Wed Aug 06, 2008 3:55 pm

Postby Mystery » Sat Aug 09, 2008 5:41 pm

Shouldn't go to the next frame with yellow, red, green, yellow, green if you use these codes, I've even tested... :?

Have you left your previous code (or variables) in the game that might cause this?
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby pennsteve » Sat Aug 09, 2008 5:57 pm

Mystery wrote:Shouldn't go to the next frame with yellow, red, green, yellow, green if you use these codes, I've even tested... :?

Have you left your previous code (or variables) in the game that might cause this?


Yes, I thought I was supposed to leave the variables in. lol

I thought that script was just some extra rules to go along with the variables. Should I have removed them?
pennsteve
Expert Member
 
Posts: 329
Joined: Wed Aug 06, 2008 3:55 pm

Postby Mystery » Sat Aug 09, 2008 6:00 pm

You just need the two integer variables: red, yellow.

But if you want, you can also use the names of your already created 2 variables, then you need to replace their names in my code of course.

Just make sure that you take out your previous settings from the tutorial that you've followed :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby pennsteve » Sat Aug 09, 2008 6:08 pm

Mystery wrote:You just need the two integer variables: red, yellow.

But if you want, you can also use the names of your already created 2 variables, then you need to replace their names in my code of course.

Just make sure that you take out your previous settings from the tutorial that you've followed :)


Ok, that worked. Thank you!

Now how hard would it be for a six color box? lol

If there is a lot of scripting and variable use, I wont bother you. I need to start practicing more of the stuff I've learned so far.
pennsteve
Expert Member
 
Posts: 329
Joined: Wed Aug 06, 2008 3:55 pm

Postby Mystery » Sat Aug 09, 2008 6:22 pm

Well, for 6 colors, it would require of course more scripting. :P

I won't have time to work on that for you tonight, so you better start to use and practice what you've learned so far :)

Or someone else has time to write a code for you...
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby pennsteve » Sat Aug 09, 2008 7:00 pm

Mystery wrote:Well, for 6 colors, it would require of course more scripting. :P

I won't have time to work on that for you tonight, so you better start to use and practice what you've learned so far :)

Or someone else has time to write a code for you...


I could try to do it myself when I have time......I know I wouldnt get it right, but I could try. I really wouldlnt need much more information than what is in the other scripts, would I? I would just have to add 3 more variables and expand the scripts and figure out the sequence of them lol.
pennsteve
Expert Member
 
Posts: 329
Joined: Wed Aug 06, 2008 3:55 pm

Postby Mystery » Sat Aug 09, 2008 7:08 pm

Well, you could try it this way, and learn a lot :D
But first just try for 4 buttons ;) Otherwise it may be too difficult for you at the moment.

(On the other hand, there might be a more elegant solution for 6 buttons.)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Sat Aug 09, 2008 10:06 pm

Pennsteve

You could try the tutorial I wrote in the Tutorial section its for colored blocks that change colours..Everything u need is on that page..:)

http://www.adventuremaker.com/phpBB2/viewtopic.php?t=3845

Its a bit more to it..but once u use it u will be able to use it for other puzzles you may want todo..:) Its just one of them..There are alot in the Tutorial Section..And you don't have to have all four blocks..you could do it with just one or two..:) This is as tut to change the color of blocks..not exactly what u are looking for..But i have used it for other puzzles as well once i understood it..I only mention it..cause it sounded like something u may want to know or learn..:)




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

Postby pennsteve » Sat Aug 09, 2008 10:34 pm

mercedes wrote:Pennsteve

You could try the tutorial I wrote in the Tutorial section its for colored blocks that change colours..Everything u need is on that page..:)

http://www.adventuremaker.com/phpBB2/viewtopic.php?t=3845

Its a bit more to it..but once u use it u will be able to use it for other puzzles you may want todo..:) Its just one of them..There are alot in the Tutorial Section..And you don't have to have all four blocks..you could do it with just one or two..:) This is as tut to change the color of blocks..not exactly what u are looking for..But i have used it for other puzzles as well once i understood it..I only mention it..cause it sounded like something u may want to know or learn..:)




Peace~


Ok, I'll have to check it out. I havent had a lot of time to go through the tutorial section because I'm trying to learn other stuff first. Have to be able to walk before I can run. lol
pennsteve
Expert Member
 
Posts: 329
Joined: Wed Aug 06, 2008 3:55 pm

Postby mercedes » Sat Aug 09, 2008 10:39 pm

Yes for sure...:lol: That's a bigger script, but you learn fast, and eager, I bet u are doing that one soon..:)



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

Postby Lyberodoggy » Sun Aug 10, 2008 9:42 am

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

Postby mercedes » Sun Aug 10, 2008 10:26 pm

Kid..can you convert that to a zip as well...Id like to look at it..:)




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

Previous

Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests