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
Tanuki
Novice


Joined: 06 Nov 2008
Posts: 38

PostPosted: Wed Jan 05, 2011 3:53 am   

OnWalkEnd
 
I have a OnWalkEnd event which deletes roomkeys from a list of roomkeys and then calls an alias OnWalkEnd that walks to the next room. The OnWalkEnd fires when it gets to the first room but never fires when it reaches the second room. It works perfectly if I change it to a OnRoomEnter event but slows everything down. What am I doing wrong?

String List: Rooms
714|715|716|717

Alias:WalkCurrRoom
CurrRoom = %item(@Rooms, 1)
#say Walking to @CurrRoom
#WAL @CurrRoom

Event: OnWalkEnd
#IF (@CurrRoom=%roomkey) {#say Match;#delitem Rooms %roomkey;#say Rooms Left @rooms; WalkCurrRoom} {#say No match, looking for @CurrRoom and your in %roomkey;}
Reply with quote
shalimar
GURU


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

PostPosted: Wed Jan 05, 2011 5:36 am   
 
maybe try
#EVENT onRoomEnter {#IF (@CurrRoom=%roomkey) {#RAISE onWalkEnd}}
_________________
Discord: Shalimarwildcat
Reply with quote
robert
Wanderer


Joined: 25 Feb 2004
Posts: 98

PostPosted: Wed Jan 05, 2011 5:13 pm   
 
Is the mapper set to do a slow walk? Have you tried looking at the script debugger output with all debug options turned on to verify only the triggers you expect to be executed are being executed? I assume if you do mapper configuration that the script debugger still shows the #OK and #TAG triggers which it makes(mine is all self configured). For the mapper to call Onwalkend it seems that the %inwalk flag needs to be true, and the correct #TAG, and then #OK needs to be called. If %inwalk is true, and %roomnum = %destroom after the #OK then OnWalkEnd is called and the %inwalk flag is cleared.
Reply with quote
Tanuki
Novice


Joined: 06 Nov 2008
Posts: 38

PostPosted: Thu Jan 06, 2011 4:09 am   
 
Thank you both for the food for thought. After looking at the debugger for some time.... I never see an #OK. I am using GMCP which somehow allows the mapper to update and move but does not sent the #ok. I guess I have some reading up to do as I don't understand what is going on. Any wisdom would be appreciated.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Fri Jan 07, 2011 8:14 pm   
 
OnWalkEnd has always been buggy. I've submitted several reports on it in the past. I can't recall if it was ever fixed, but I stopped trying to use it a while ago. Most recently I recall it calling the event every room it hit along a path because each room in slow walking mode is considered a separate walk.
Reply with quote
Tanuki
Novice


Joined: 06 Nov 2008
Posts: 38

PostPosted: Sat Jan 08, 2011 4:12 am   
 
Reedn,
So what do you suggest as a work around?
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sat Jan 08, 2011 4:37 pm   
 
I think I just found a different way to do it altogether or I might have tested for the destination room in onRoomEnter.
Reply with quote
Tanuki
Novice


Joined: 06 Nov 2008
Posts: 38

PostPosted: Sun Jan 09, 2011 5:00 am   
 
So basically what Shalimar said. I was afraid it would slow things down but I don't think I have a choice.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sun Jan 09, 2011 6:45 am   
 
Odd, I dug up a past post of mine and I thought it was fixed... last I knew. I had filed a bug report on it, but by the time it was fixed I had stopped trying to use it.

[Fixed] Mapper Issues with %inwalk %walkactive %destroom and onWalkEnd
http://forums.zuggsoft.com/forums/viewtopic.php?t=33205
Reply with quote
Tanuki
Novice


Joined: 06 Nov 2008
Posts: 38

PostPosted: Wed Jan 12, 2011 12:40 am   
 
Would you mind testing again? I don't think it is fixed but I haven't used CMud before. I also can not get Shalimar's suggestion to work as the OnRoomEnter seems to fire with the GMCP message which happens way before the Mapper catches up and there fore reports the wrong room.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Wed Jan 12, 2011 12:46 am   
 
Sorry, it's just been too long and I no longer feel any vested interest in spending time to get this to work.
Reply with quote
robert
Wanderer


Joined: 25 Feb 2004
Posts: 98

PostPosted: Wed Jan 12, 2011 4:15 pm   
 
My onwalkend seems to work. I just put a #SAY in it, and it doesn't print out every step, and it seems to be printing successfully at the end. I can't say it is bug free, but it seems to normally be working for me.
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