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
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sat Oct 04, 2008 2:19 am   

Ability to temp an event?
 
I have events set up for a number of things.
I dont code in any other program/language so onlything i know about coding comes from cmud.

What i would like to know, is it possible to #temp an event?
for instance i want a 1 time trigger to fire on my prompt or something of that nature.
is that possible without having my entire prompt in the line?
Reply with quote
shalimar
GURU


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

PostPosted: Sat Oct 04, 2008 2:27 am   
 
#TEMP {*} {#RAISE event} _nodef {prompt}

should work... i think
_________________
Discord: Shalimarwildcat
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Oct 04, 2008 8:06 am   
 
I think what harley is asking for is an event handler that works like a temp trigger - it only goes once when its event is raised, and then it's never heard from again. And this is very possible, yes - unfortunately there's no #unevent command (yet), but you can create your event, give it an ID and then disable it using #t- (if your code would be creating the same "temp event" every now and again, it'd be easier to keep the event around and turn it on and off instead) or you can put it in a class and then delete the class using #unclass (if you're really truly only doing it once - like, say, from the command line).
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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