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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Mon Dec 31, 2012 9:57 pm   

Can I tie a button to a room
 
Is there a way to tie a button to a specific room?

I know I can add it to the rooms trigger to turn it on, but that can cause problems with using paths where it skips the path sometimes.

Is there a better way to do this?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Dec 31, 2012 11:12 pm   
 
Quote:

Is there a way to tie a button to a specific room?


Yes, use a room script. You are obviously doing it wrong, so here's a step-by-step of how to make a room script:

1)find the roomkey value of the room you want the script to attach to (for illustration, we'll use Room #123)
2)open up the Package Editor
3)select the Mapper Object
4)create a new class and name it whatever you want
5)in the Option panel for the class set the Key field to Room### where ### is the roomkey value (ie, Room123)
6)create the necessary buttons/aliases/triggers/etc used by your script

That's it. CMud will now automatically enable this class whenever the location dot is set to this room, and automatically disable it when the location dot moves away to a different room. It doesn't matter where this class is (so long as the mapper object can see it), and it doesn't matter how many classes have this key value; like events being raised, CMud will enable/disable all such classes together.
_________________
EDIT: I didn't like my old signature
Reply with quote
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Mon Dec 31, 2012 11:22 pm   
 
Edit: I figured it out, I was putting it in a subclass in the subclass..

Thanks a bunch!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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