problem with a puzzle

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

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

problem with a puzzle

Postby insaneproject » Thu May 24, 2012 12:45 pm

I have to call 5 times consecutively to a door that is there will be, as I can do?
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN

Postby mercedes » Thu May 24, 2012 9:16 pm

Are you asking if you can knock 5* in a row on a door?
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby insaneproject » Fri May 25, 2012 12:50 am

yes!and the fifth time the gate is open
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN

Postby reneuend » Fri May 25, 2012 2:17 am

Are you comfortable with VBScript?

I would create an integer variable as a counter and when it reaches 5, then perform the action.


Code: Select all
'ON THE FRAME PROPERTIES - Advanced Tab
'===========================
knock_count = 0


Code: Select all
'ON THE HOTSPOT
'======================
knock_count = knock_count + 1

if knock_count >= 5 then
     'Add code to perform some kind of action here!
end if
---


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

Postby insaneproject » Fri May 25, 2012 12:46 pm

little else I want is that after you make 5 click on the door is passed to a video of a door opening ....
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN

Postby insaneproject » Fri May 25, 2012 1:16 pm

my problem been solved:

I have done the following:

"Create a new global integer variable. To do so, click "VBS Variables (advanced)" from the Project Menu of Adventure Maker. Let's call it "MyVariable" for example.

Now add the following code to the "advanced" tab of the "Hotspot Properties" window:
MyVariable = MyVariable - 1
If MyVariable = -5 Then Action.GoToFrame "DESTINATION"

Where you must change "DESTINATION" with the name of the frame to which you want to go.

from: VBSCRIPT TECHNIQUES AND TIPS HELP AM
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN

Postby insaneproject » Fri May 25, 2012 2:58 pm

I go now a new problem

imagine: you get to the door and give her a click does not open, go to another frame and when you come back with a note of the information you need to take 5 clicks on that door to open, you can not knock on the door so can not go and pick up an item inside. I have to add some more code?
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN

Postby reneuend » Fri May 25, 2012 3:57 pm

If I understand correctly, reset MyVariable = 0 in the Frame Properties - advanced tab. This will reset the variable and the user will have to click on the door 5 times each time the come to the frame.

I'm not sure this is what you were asking for, but at least maybe it will help.
---


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

Postby mercedes » Fri May 25, 2012 4:05 pm

insaneproject wrote:I go now a new problem

imagine: you get to the door and give her a click does not open, go to another frame and when you come back with a note of the information you need to take 5 clicks on that door to open, you can not knock on the door so can not go and pick up an item inside. I have to add some more code?




You might also have to set a variable on the HS of the note..If its the note they need to open the door....
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby reneuend » Fri May 25, 2012 5:52 pm

or you could just use the function "hasitem()" and just check for the note if the note is an inventory item.

Code: Select all
If hasitem("note") then
    'check if door is open
    if myvariable <= -5 then
        'open door
    else
        myvariable = myvariable - 1
    end if
else
    'you don't have the note, so do nothing
end if



Code: Select all
Function HasItem(ItemName)
HasItem = False
For Each X in InventoryItemObject
If X.Tag = ItemName Then
HasItem = True
End If
Next
End Function 'HasItem
---


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


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests