|
harley Apprentice
Joined: 05 Apr 2008 Posts: 121
|
Posted: 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? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Sat Oct 04, 2008 2:27 am |
#TEMP {*} {#RAISE event} _nodef {prompt}
should work... i think |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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).
|
|
|
|
|
|