Random Message on a hotspot?

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

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

Random Message on a hotspot?

Postby mercedes » Fri Jul 25, 2008 7:35 am

I have tried a few scripts for when a user clicks on a hotspot..but nothing is working so far..:( and I'm really tired now...

I want the user to click on one hotpot and have it display random messages...at least 3..

Any suggestions would be welcome..


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

Postby Mystery » Fri Jul 25, 2008 9:54 am

You can change Candle's script for random sounds to fit your needs :)

http://www.adventuremaker.com/phpBB2/vi ... ght=random
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby Lyberodoggy » Fri Jul 25, 2008 10:39 am

It's easy...

Code: Select all
yourvariable=Int(Rnd*the_number_of_random_messages)+1
Select case yourvariable
Case 1
Action.Message "Hi"
...
End Select
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Fri Jul 25, 2008 11:07 am

HI guys..:)

Actually Candles Script would not work for this..Mystery...for some reason..like Action.Message wasn't an option... :? I'll try it again..
I don't have to make a variable with it do I..You know your're tired when...lol..

*EDIT* I have tried Candle's again it is still no go...:(

Thats where I was going with Select Case..Lyberodoggy..but its not working..Although i see why not at first..I'm french and I was putting Case Select....... :roll:

Code: Select all
Messages=Int(Rnd*3)+1
Select Case Messages
Case 1
Action.Message "Grass is Pretty TAll"
Case 2
Action.Message "I can't see that well.."
Case 3
Action.Message "Are we done here?"

End Select


But this is not working for me either..? some reason.. The only message that is coming up is the last one..."Are we done here....?"

I'm wanting this in the same hotspot eh...
Any other..suggestions..?

I assume I put this in the hotspot Advanced right..?
Same as Candles?

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

Postby Mystery » Fri Jul 25, 2008 11:33 am

Well, for me the test works:

Code: Select all
randomize
   i = int( RND * 3 ) + 1
   If i = 1 then Message "Hi1"
   If i = 2 then Message "Hi2"
   If i = 3 then Message "Hi3"


(Added code to Advance Tab of hotspot)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby ShadowHunter » Fri Jul 25, 2008 11:34 am

Hi Mercedes,

The code is fine, just add "randomize" on top of your code :D

That does the trick !

With best regards,

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

Postby mercedes » Fri Jul 25, 2008 11:41 am

OF COURSE....[randomize] LOL..


Thanks so much,
All of you for your help.:D
Works perfect!

You know your tired when...:P

OH and i see you never put Action.Message Mystery...I will try that as well at some point...Thanks!

*EDIT* Both work perfectly...~

Merci~
Peace
Adieux~~
Last edited by mercedes on Fri Jul 25, 2008 11:46 am, edited 1 time in total.
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Mystery » Fri Jul 25, 2008 11:43 am

Shouldn't make a difference.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Fri Jul 25, 2008 11:47 am

Actually this way worked..the way you posted it..the Action.message won't...weird..:?

Thanks Either way..!~

Peace..


*EDIT*

Your're going to think i'm on crack..it's working now..:?

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

Postby Lyberodoggy » Sat Jul 26, 2008 10:53 am

ShadowHunter wrote:Hi Mercedes,

The code is fine, just add "randomize" on top of your code :D

That does the trick !

With best regards,

ShAdOwHuNtEr

I forgot it again :oops: :oops:
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby Lyberodoggy » Wed Jul 30, 2008 10:33 am

Sorry for the bumping, but if anyone has the same problem again, they could use this plugin: http://www.adventuremaker.com/phpBB2/viewtopic.php?p=16350#16350
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron