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
shalimar
GURU


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

PostPosted: Tue Jul 27, 2010 12:59 pm   

Movement Queue
 
Is there a way I can programatically add directions to the queue?

#TR {You begin walking (%w)ward.} {}

I don't want to just assume to use #MOVE because for whatever reason, I might not actually make it to the next room, I just want to add it to the queue, so that if I do make it, my position on the map updates, and if not, one of my various #NODIR triggers will remove it.

I hope I have been clear.
_________________
Discord: Shalimar#3679
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Jul 27, 2010 2:57 pm   
 
#QUEUE Should do what you want.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
shalimar
GURU


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

PostPosted: Wed Jul 28, 2010 1:34 pm   
 
Is there a way to test the queue to see if its empty before adding my own directions to it?
_________________
Discord: Shalimar#3679
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed Jul 28, 2010 5:55 pm   
 
Not that I can find, or remember.

It's amazing that I recalled the #QUEUE command.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
shalimar
GURU


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

PostPosted: Wed Jul 28, 2010 8:47 pm   
 
#QUEUE is not fully working as i expected, as i can only know one step of the path at a time

I can easily use {#QUEUE %1} as the value for the trigger above, and if the mapper queue resolves before the trigger fires again (which it should) things are hunky-dory.
However... if you even use {#2 {#queue %1}} it will throw the commands for both steps of the path in (according to the map) instead of just adding to the queue.
_________________
Discord: Shalimar#3679
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