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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Mon Dec 21, 2009 3:15 pm   

Actions on movement
 
I'm probably thinking about every way to possibly do this but the right one.

I want to reset variables whenever I leave a room. I know I can use an event to do the resetting, however, I am not quite sure how to get the event raised probably.
I want the mapper to still move along with the movement.

Any suggestions?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Dec 21, 2009 5:44 pm   
 
The mapper will automatically raise onRoomEnter and onZoneEnter events when it detects movement. Another useful built-in event to know is onRoomCreate.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Dec 21, 2009 5:57 pm   
 
If you are talking about having special actions occur when entering or leaving a specific room (or zone), then there is another method to use. Create a folder (probably in your Map module) with a key of "RoomXXXX" where XXXX is the id number of the room. That folder will automatically be enabled when entering and disabled when leaving that room. In the Package Editor, edit that folder. There are tabs labeled "Enable Script" and "Disable Script". Edit the script fields for those tabs. The Enable Script will fire when the class folder is enabled or disabled, and the key value causes that to happen when entering or leaving the room. You may have multiple classes with the same key value, and all of them will enable or disable when passing through the matching room. Use a key of "ZoneXXXX" to do the same for entering and leaving zones.

At last word, Zugg hopes to eventually add an extension of this feature, which would allow classes to have multiple keys, such that when you entered a room which was a "Shop" type, every class with a key of "Shop" would be enabled, running their Enable Scripts.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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