ID:179131
 
I'm trying to handle a scenario where a player's turn expires while they are stuck at an alert prompt. The problem is that another proc should get called later which affects scoring for all players, so I don't want this to be delayed until the player comes back to their computer and deals with the alert.

I have an idea for a lengthy workaround, but it would be much easier if I could forcibly kill the alert prompt. Is there any way to do this?

Thanks!
dramstud wrote:
I'm trying to handle a scenario where a player's turn expires while they are stuck at an alert prompt. The problem is that another proc should get called later which affects scoring for all players, so I don't want this to be delayed until the player comes back to their computer and deals with the alert.

I have an idea for a lengthy workaround, but it would be much easier if I could forcibly kill the alert prompt. Is there any way to do this?

I don't think there is, no. For this reason, alert() is a bad choice for anything time-sensitive in a multiplayer game. I'm trying to phase out my game's few uses of input() for the same reasons.

You could, I suppose, use browse() to pop up a box and deal with that. I'm not sure how popup browse() operations work in BYOND because they're fairly new and I haven't used them. You'd have to react not just to links being clicked (client.Topic() works for that) but to the box being closed, and you'd need to forcibly close it when time expired. But I think these things can be done with browse().

Lummox JR
Tom provided a clever way to deal with alerts in this post: [link]
In response to Shadowdarke (#2)
Shadowdarke wrote:
Tom provided a clever way to deal with alerts in this post: [link]

Oooh! Good call! I forgot all about that.

Lummox JR