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
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sun Oct 11, 2009 4:24 am   

[3.10a] Mapper room script feature improvment, opinions needed
 
I am using safe mode walking and I rely heavily on room scripts and triggers to make sure certain movements work correctly. With the changes to the mapper in the 3.0 versions In order to do that I have to put the room script in the room I am heading too and not the room I am in which as you can guess can get aggrevating.

I am pretty sure room scripts are actived and deactived upon sending a direction to the mapper queue and not on the #OK. Here is an example using {e} as the direction entered starting in ROOM1 with the room1's scripts active


#T+ ROOM1; {e}; #T- ROOM1; #T+ ROOM2; #RAISE onRoomWalk; #OK; #RAISE onRoomEnter

I propose that this be changed slightly to either not change until the #OK I.e.
#T+ ROOM1; {e}; #RAISE onRoomWalk; #OK; #T- ROOM1; #T+ ROOM2; #RAISE onRoomEnter
//room1's onroomwalk would fire when walking to room2

or so that the current room and the destination rooms are both active until the #OK is recieved
#T+ ROOM1; {e}; #T+ ROOM2; #RAISE onRoomWalk; #OK; #T- ROOM1; #RAISE onRoomEnter
//if there was an onRoomWalk event in rooms 1 and 2 it would fire both of them....


edited to reflect onroomwalk and onroomenter
_________________
Zmud Support Library
Zmud Knowledge Base

Last edited by nexela on Sun Oct 11, 2009 4:50 am; edited 2 times in total
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sun Oct 11, 2009 4:27 am   
 
I guess what first comes to mind is how this would work with the onroomenter and onroomwalk events that are created in the rooms.....
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Oct 12, 2009 4:19 pm   
 
I'll take a look into this. I think your first suggestion might be do-able. The second one doesn't work because the CMUD mapper only wants one room to be enabled at any given time. Otherwise, if you never get the #OK for some reason, you could end up with lots and lots of room scripts being active.

But the logic in your first example seems reasonable. However, this probably won't make it into the next beta yet unless it's a really trivial change in the code.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Oct 23, 2009 11:04 pm   
 
I've decided not to make any changes to how this works right now.

In looking at the notes in my code, the design is:

1) Enable room scripts in the destination right after sending the direction to allow the destination room script to issue an #OK if desired. This requires that the #T+ ROOM2 be done *BEFORE* the #OK.

2) As mentioned above, only ONE room script is ever active at any time. So right before CMUD does the #T+ ROOM2 it issues the #T- ROOM1

3) The onRoomWalk was also intended to contain possible #OK logic, so again, it needs to come BEFORE the #OK.

I think what we probably need to do is come up with a NEW EVENT rather than changing the logic of the current events. You can let me know what the event should be called and how it should work.
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