press keys on keypad

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

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

press keys on keypad

Postby Giuseppe » Sun Aug 29, 2010 10:33 am

I do press four keys, example: 1-2-3-8 on a keypad. No press 2381, 3821..etc..but in exactly sequence 1-2-3-8

Image

press OK, If correct goto......
press OK If mistake goto......

is it possible about code?
thank!
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm

Postby juhuwoorps » Sun Aug 29, 2010 10:50 am

Yes its possible.
Create a variant variable (f.e door_code)

Create a hotspot for each number.

In the advanced tab of each hotspot type this:

door_code=door_code & "HERE THE NUMBER OF THE CLICKED BUTTON"

(replace HERE THE NUMBER OF THE CLICKED BUTTON with the number of the keypad which is under the hotspot)

create a hotspot over the ok button and type this to the advanced tab:

if door_code="1238" then
action.gotoframe "doorcodeok"
else
action.gotoframe "doorcodeinput"
end if

replace the framenames with your own framenames.

Hope this helps.

Nice sunday to all

Greetings Juhu
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Giuseppe » Sun Aug 29, 2010 11:05 am

ok, i try!
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm

Postby juhuwoorps » Sun Aug 29, 2010 11:13 am

I have forgot something:

Go to advanced tab of the frame and type this:

door_code=""
Last edited by juhuwoorps on Sun Aug 29, 2010 1:29 pm, edited 1 time in total.
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Giuseppe » Sun Aug 29, 2010 12:30 pm

If door_code="1238" Then
Action.GoToFrame "carrental"
Else
Action.GoToFrame "davantirental"
End If


push correct or not, go ever in "davantirental"
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm

Postby juhuwoorps » Sun Aug 29, 2010 1:31 pm

Do you have seen my last post?
To debug this:
click the right numbers and before you click ok go to the debug tab and have a look at your variables.

what does it show at door_code?
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Giuseppe » Sun Aug 29, 2010 1:45 pm

" door_code=1" in debug!


Frame

Image

Hotspost 1,2,3 and 8

Image

hotspot "OK"

Image
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm

Postby juhuwoorps » Sun Aug 29, 2010 3:12 pm

Do you have entered this code:

door_code=door_code & "HERE THE NUMBER OF THE CLICKED BUTTON"

to every keypad hotspot?
Last edited by juhuwoorps on Sun Aug 29, 2010 3:17 pm, edited 1 time in total.
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Giuseppe » Sun Aug 29, 2010 3:16 pm

juhuwoorps wrote:Do you hav entered this code:

door_code=door_code & "HERE THE NUMBER OF THE CLICKED BUTTON"

to every keypad hotspot?

yes
hotspot 4 (number1)= &1
hotspot 5 (number2)= &2
hotspot 6 (number3)= &3
hotspot 7 (number8)= &8
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm

Postby juhuwoorps » Sun Aug 29, 2010 3:25 pm

Somethings wrong with your code.
Have a look at this:
http://www.wuttiggames.com/downloads/doorcodetest.zip
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Giuseppe » Sun Aug 29, 2010 3:47 pm

I tried but don't work
I tried in a new projects with my icon but don't work..

strange...

do you want send you the project?
Last edited by Giuseppe on Sun Aug 29, 2010 3:49 pm, edited 1 time in total.
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm

Postby juhuwoorps » Sun Aug 29, 2010 3:49 pm

The project I send you works fine for me. The right code is 1234.You have to click the right code to get to the code ok frame

Do you have tested my little project?
If you want you can send me your project (Please send it per email)
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Giuseppe » Sun Aug 29, 2010 3:55 pm

juhuwoorps wrote:The project I send you works fine for me. The right code is 1234.You have to click the right code to get to the code ok frame

Do you have tested my little project?
If you want you can send me your project (Please send it per email)


i tested your project and work..i copied exactly but don't work.

I send you the project link about email
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm

Postby Giuseppe » Sun Aug 29, 2010 4:19 pm

juhuwoorps wrote:The project I send you works fine for me. The right code is 1234.You have to click the right code to get to the code ok frame

Do you have tested my little project?
If you want you can send me your project (Please send it per email)


ok, you have a mail.
Thanks.
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm

Postby Giuseppe » Sun Aug 29, 2010 7:35 pm

Nada.
I think don't read a variant because with only this string:

if door_code="1238" then
action.gotoframe "doorcodeok"
End If
dont'work

Edit: resolved.
I created a new frame equal to that did not work.
from the first frame that did not work, after I did an action, I sent another frame always with the same image and it works.
Giuseppe
Frequent Poster
 
Posts: 147
Joined: Wed Mar 12, 2008 12:01 pm


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron