Right click to open another location?

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

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

Right click to open another location?

Postby Bzyk » Wed Mar 09, 2011 1:14 pm

I know it is possible, but I forgot, how... :(

In my first game I created this event: on the mouse right click game jumped to another location with my own menu. But I cannot find a way now, how to do this...

Help! :P
Luminous beings are we, not this crude matter...
User avatar
Bzyk
Frequent Poster
 
Posts: 142
Joined: Sat Feb 17, 2007 9:49 pm
Location: Poland

Postby Bzyk » Wed Mar 09, 2011 1:26 pm

OK, don't bother, I got it! :) Silly me... :P
Luminous beings are we, not this crude matter...
User avatar
Bzyk
Frequent Poster
 
Posts: 142
Joined: Sat Feb 17, 2007 9:49 pm
Location: Poland

Postby Bzyk » Wed Mar 09, 2011 2:46 pm

OK, I have got this:


If inmenu=0 then
lastframe=GetCurrentFrameName
GoToFrame "right_menu" ,0.5,1
Action.HideInventoryButton
inmenu=1
Else
GoToFrame lastframe ,0.5,1
Action.ShowInventoryButton
inmenu=0
End If


It's working perfectly, but... (there's always some "but":)). I've got some intro on my game, and I don't want to allow the user to use "right click option" until the proper gameplay will start... Can I block this script in intro frames???
Luminous beings are we, not this crude matter...
User avatar
Bzyk
Frequent Poster
 
Posts: 142
Joined: Sat Feb 17, 2007 9:49 pm
Location: Poland

Please

Postby Harvester » Wed Mar 09, 2011 8:34 pm

Please use the editing post feature instead of double posting :wink:

Harvester
*** www.nikotinzenekar.hu <-2011. album titled 'Mese' free to download! (5th button). *** www.mydarkmind.atw.hu <- under construction for a while.
User avatar
Harvester
Forum Master
 
Posts: 883
Joined: Mon Jan 10, 2005 6:28 pm
Location: Hungary

Postby Bzyk » Wed Mar 09, 2011 8:37 pm

Yeah, sorry, I forgot... :P
Luminous beings are we, not this crude matter...
User avatar
Bzyk
Frequent Poster
 
Posts: 142
Joined: Sat Feb 17, 2007 9:49 pm
Location: Poland

Postby Lyberodoggy » Wed Mar 09, 2011 10:44 pm

add an if like this:

Code: Select all
if getcurrentframename<>"introframe1" and getcurrentframename<>"introframe2" then

' your code here

end if



feel free to add more frames if you want them excluded, but remember to use the conjuction (logic operator AND) between the conditions
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby Bzyk » Wed Mar 09, 2011 10:58 pm

Wow, thanks!


But please, tell me, where I was wrong:

If GetCurrentFrameName<>"000"
and GetCurrentFrameName<>"000-001"
and GetCurrentFrameName<>"000-01"
and GetCurrentFrameName<>"000-02"
and GetCurrentFrameName<>"000-03"
and GetCurrentFrameName<>"000-04"
and GetCurrentFrameName<>"000-07"
and GetCurrentFrameName<>"000-08"

then

If inmenu=0 then
lastframe=GetCurrentFrameName
GoToFrame "right_menu" ,0.5,1
Action.HideInventoryButton
inmenu=1
Else
GoToFrame lastframe ,0.5,1
If InventoryItemObject.count>1 then
ShowInventoryButton
End If
inmenu=0
End If


End If

AM says I wrote invalid script. "Expected 'Then'"


BTW, you're from Greece! Beautiful country! Years ago I spent my holiday near Thessaloniki. And July 1st 2011 I fly to Zakynthos! :)

___________
OK, I already know - mea culpa - unnecessary enters... :P
Luminous beings are we, not this crude matter...
User avatar
Bzyk
Frequent Poster
 
Posts: 142
Joined: Sat Feb 17, 2007 9:49 pm
Location: Poland

Postby Lyberodoggy » Wed Mar 09, 2011 11:10 pm

:) great
If you can believe it I 've yet to go to thessaloniki and I wanted to, but never got the chance since I wasn't an adult and therefore was forced to go where my parents went for holidays.
Anyway, the error is generated becase your conditions should be in the same line

Code: Select all
If GetCurrentFrameName<>"000" and GetCurrentFrameName<>"000-001" and GetCurrentFrameName<>"000-01" and GetCurrentFrameName<>"000-02" and GetCurrentFrameName<>"000-03" and GetCurrentFrameName<>"000-04" and GetCurrentFrameName<>"000-07" and GetCurrentFrameName<>"000-08" then

If inmenu=0 then
lastframe=GetCurrentFrameName
GoToFrame "right_menu" ,0.5,1
Action.HideInventoryButton
inmenu=1
Else
GoToFrame lastframe ,0.5,1
If InventoryItemObject.count>1 then
ShowInventoryButton
End If
inmenu=0
End If

End If


now it is displayed in two lines because of the screen resolution, but in am there's horizontal scrolling so it should take one line
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby Bzyk » Wed Mar 09, 2011 11:14 pm

Thx!!! :)
Luminous beings are we, not this crude matter...
User avatar
Bzyk
Frequent Poster
 
Posts: 142
Joined: Sat Feb 17, 2007 9:49 pm
Location: Poland

Postby Lyberodoggy » Wed Mar 09, 2011 11:14 pm

No problem :)
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron