I'd like to have a way to clear an open alert or input box from within the code.
For example, in Tanks when a soldier bumps a player tank, the tank driver gets an alert box asking if they want to accept the player as a gunner. I could give the soldier an alert box at the same time that gives them a chance to cancel the request. If a player clicks on either alert box, it would remove both of them.
It would also be handy for timed menus. For instance, you could give a player 10 seconds to choose an attack while the opponant has 10 seconds to choose a defense.
ID:137581
Sep 26 2001, 4:40 am
|
|
In response to Tom
|
|
Excellent! Thanks Tom. :)
|
In response to Tom
|
|
You can do this by taking advantage of the fact that the server kills all procs attached to an object when that object is deleted. Example: > mob/verb/timedalert() <FONT SIZE=6>DOH!</FONT> With this knowledge, you just invalidated my last 2 months of development. |
In response to Leftley
|
|
Poor, oppressed Leftley...
Genocide of all that is "Left". |
In response to Leftley
|
|
You can do this by taking advantage of the fact that the server kills all procs attached to an object when that object is deleted. With this knowledge, you just invalidated my last 2 months of development. I hope by 'invalidated' you mean 'elliminated the need to be doing some extra work I thought was necessary' and not 'prevented me from being able to do something in a reasonably simple way'. By the way: you can dissociate a proc from its parent object by simply setting src = null. Then when the object gets deleted, the proc does not also get killed. --Dan |
In response to Dan
|
|
I hope by 'invalidated' you mean 'elliminated the need to be doing some extra work I thought was necessary' and not 'prevented me from being able to do something in a reasonably simple way'. Eh... a little bit from column A, a little bit from column B. The immediate reason I stopped working on Delve! to pursue other projects was the immense frustration I was having with the client handling and join queue system... all of which stemmed from the fact that the alert() and prompt() functions happened to be by far the most sensible interface from the player's point of view, and yet one of the least desirable from the coder's point of view (due to the fact that I was unaware of any way to abort them). I wasn't able to ever get a stable prompt()-based system, and wasn't willing to make the system bend over backwards to create what would end up being a silly and ineffecient interface, so I went off and started venting creative steam on new projects. In short, had I known this trick a couple of months ago, my last two projects would have never occured at all and I'd be two months the further on what could still reasonably be called my "main" project. |
In response to Tom
|
|
I realize this post is fairly old, yet I need to do something similar. It seems that I try the exact code and it no longer works. Has the technique for this been changed or has it been completely removed in the newer versions?
|
In response to BobJr
|
|
http://www.deadron.com/byond/ ByondBwicki.dmb?ClosingAlertBoxes
There was just one little thing that needed to be added to what Tom posted. |
In response to tenkuu
|
|
tenkuu wrote:
http://www.deadron.com/byond/ ByondBwicki.dmb?ClosingAlertBoxes I need to know what that one part is, but the link doesn't seem to work. :( If anyone can answer this I'd appreciate it. :) |
In response to Jnco904
|
|
Jnco904 wrote:
I need to know what that one part is, but the link doesn't seem to work. :( If anyone can answer this I'd appreciate it. :) Bwicki has its own domain now, so try: http://bwicki.byond.com/ByondBwicki.dmb?ClosingAlertBoxes |
In response to Tom
|
|
Tom wrote:
Bwicki has its own domain now, so try: Cool, thanks. :) |
You can do this by taking advantage of the fact that the server kills all procs attached to an object when that object is deleted. Example: