ID:1046691
 
(See the best response by Jemai1.)
I would like to be able to remove this alert after some seconds have passed:

var/mob/M=input("Who to use Quake on?", "Quake") as null|anything in Enemies


I don't know if it's possible, but it'd be really cool if I could do something to hide it after some secs have passed. Any idea? :S

Thanks.
You could make your own alerts with the interface tools provided and just hide the window after sleep(), otherwise I don't think it's possible. Sorry.
Or try out Shadowdarkes library

http://www.byond.com/developer/Shadowdarke/sd_Alert

"sd_Alerts may be tagged so that other procs can manipulate or close them. (Foomer)"
Best response
Make a datum that will hold your proc
helper
proc/Input(delay=600,Enemies)
spawn(delay)
del src // delete after delay
return input("Who to use Quake on?", "Quake") as null|anything in Enemies


Then do the following
var/helper/helper = new
var/mob/M = helper.Input(20,Enemies)
if(!helper)
src << "Time is up!"
else if(!isnull(M))
src << "You selected: [M]"


The trick here is that when a datum is deleted, all of its procs will end. Therefore, if you delete helper, helper.Input will return immediately.