multiple responses to an action

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

multiple responses to an action

Postby Candle » Fri Aug 25, 2006 11:19 pm

How would you do this to a clicked hotspot?
#1 click
I don't want that.
#2 click
I don't need that.
#3 click
Ok I'll take it now.
Give item to player.
Is there a plugin for such?
Please don't PM me questions, ask here in the forums!
``````````````
Between grand theft and a legal fee, there only stands a law degree.
User avatar
Candle
Administrator
 
Posts: 3077
Joined: Sat Feb 07, 2004 2:21 am
Location: Rudy's Bar

Postby Bortdafarm » Sat Sep 02, 2006 11:30 pm

could you have three hostspots on top of each other with "yes" "no" spots along side?

if you click hot spot one then click "no" hotspot one is removed revealing hotspot two etc..or have variable doing the same job...like a sort of shop interface....
Bortdafarm
 

Postby Candle » Sat Sep 02, 2006 11:33 pm

Yes I guess you could do it that way. I was hoping a better way to do it with out a lot of hotspots .
Please don't PM me questions, ask here in the forums!
``````````````
Between grand theft and a legal fee, there only stands a law degree.
User avatar
Candle
Administrator
 
Posts: 3077
Joined: Sat Feb 07, 2004 2:21 am
Location: Rudy's Bar

Postby ShadowHunter » Sun Sep 03, 2006 11:07 am

Hi Candle,

I would use a global counter and the select case statement.

Every click increases the counter by one hence the proper action can be taken :D

You can use thousands of actions that way with only one hotspot.

Good luck,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Postby Candle » Sun Sep 03, 2006 4:47 pm

So you could use something like this from the help file?

EXAMPLE - How to make an hotspot appear after 5 mouse clicks:

If you want a hotspot (let's call it hotspot1) to appear after the player has clicked 5 times on another hotspot (let's call it hotspot2), then follow these steps:

1. Create a new Integer variable called "myvariable"
2. Go to the properties of hotspot1 and set it to be visible only if the value of myvariable is 1 (to do so, use the option "the hotspot must be enabled/visible only if..." that is under the "Variables" tab).
3. Go to the properties of hotspot2 and add the following code to the VBScript text field:

myvariable = myvariable - 1
if myvariable = -5 then myvariable = 1

The initial value of myvariable is 0. The first line of code will decrease the value of myvariable by 1. The second line will check if the value of myvariable is (-5). If that is the case, the value of myvariable will become 1, which will automatically cause hotspot1 to appear.
User avatar
Candle
Administrator
 
Posts: 3077
Joined: Sat Feb 07, 2004 2:21 am
Location: Rudy's Bar

Postby ShadowHunter » Sun Sep 03, 2006 4:54 pm

Hi Candle,

Something like that yes... however I would write it like this... keeping in mind that Counter is a global variable which is set to 0 when the frame is loaded (for example)


Code: Select all
Sub HotSpotClicked

Counter = Counter + 1

Select Case Counter

Case 1

MsgBox "Hello... ?"

Case 2

MsgBox "I said hello... !"

Case 3

Msgbox "Nobody home I guess"

Case 4

Counter = 0

End Select

End Sub

Hope this helps,

Kind regards,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Postby Candle » Sun Sep 03, 2006 4:59 pm

I think I understand. I'll doing some playing and see how it works.
User avatar
Candle
Administrator
 
Posts: 3077
Joined: Sat Feb 07, 2004 2:21 am
Location: Rudy's Bar

Postby Mystery » Sun Sep 03, 2006 8:14 pm

ShadowHunter, you got always so good solutions :D
I'm eager to learn new features, thanks (even if the idea came originally from Candle) :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby ShadowHunter » Sun Sep 03, 2006 8:23 pm

Hi Mystery,

Thanks :D

Well... with scripting there are few things you can't to !

How is it working for you Candle ? Feel free to ask for support.

Kind regards,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Postby Candle » Sun Sep 03, 2006 10:12 pm

Haven't had time to do it yet.
User avatar
Candle
Administrator
 
Posts: 3077
Joined: Sat Feb 07, 2004 2:21 am
Location: Rudy's Bar


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron