Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Silanus
Beginner


Joined: 25 Nov 2005
Posts: 13

PostPosted: Wed Nov 30, 2005 2:42 pm   

Varable Randomizer
 
I'd like to randomize my @sword varible
I found the code line below in a Forum post regarding random sound triggers and tweaked it slightly but can't quite get it to work.

#var sword %case(%rand(1,3),sword1.wav,sword2.wav,sword3.wav)

I know I'm doing something wrong but have looked everywhere and the help files that I've found that might unlock this riddle are above me.

Thanks in advance for your help.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Wed Nov 30, 2005 3:02 pm   
 
#VAR sword {sword1.wav|sword2.wav|sword3.wav}
#PLAY %item(@sword, %random(1, %numitems(@sword)))
_________________
Discord: Shalimarwildcat
Reply with quote
Silanus
Beginner


Joined: 25 Nov 2005
Posts: 13

PostPosted: Wed Nov 30, 2005 8:05 pm   
 
Works like a charm!

You are a Magician!

Thanks after the fact too!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net