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
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Wed Oct 23, 2002 9:36 pm   

scope
 
is there anyway to limit the scope of a variable to a class? for instance, i have several characters on one mud. i use the same file to hold the setting for this mud. i have an alias like this:
#alias atconnect {#t+ %char}
and i put character specific triggers and alias's in the class for that char. i'd also like to put character specific variables in that class, but can't figure out how. thanks :)
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Oct 23, 2002 10:34 pm   
 
Sure just drag them into the class from wherever they are. Make sure all you character classes are set to disable on connect, then move the #t+ command from the atconnect alias to the trigger that sends your password.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Oct 23, 2002 11:28 pm   
 
You can do this when creating a variable by using the class parameter. If you don't want the variable to have a default, use _nodef
#VAR varname value default class
#VAR example 27 0 %char
#VAR example2 {this is a string} {_nodef} {%char}

LightBulb
Senior Member
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Thu Oct 24, 2002 12:23 am   
 
ah, thanks, thats exactly what i was looking for.
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