ID:270982
Nov 30 2006, 11:04 am
|
|
I am not really sure if there is a way to do it, but how would I go about rewriting Dream Seeker options such as World Reboot?
|
In response to GhostAnime
|
|
Basically, overwrite World Reboot. I have seen it done in a few games, but I am not really sure how to begin it myself.
|
In response to Quest Industries
|
|
Quest Industries wrote:
Basically, overwrite World Reboot. I have seen it done in a few games, but I am not really sure how to begin it myself. I am asking what do you want to "overwrite" it with? Because people are not really overwriting... do you want a countdown? I am simply asking WHAT you want to ADD/CHANGE the built-in procedure with. What you replied to me was basically like this: You: I want a drink. Myself: Which type of drink? [if you don't get it, I am referring to soft drinks such as 'Cola, Orange, Sprite/7'up] You: you know, I want a drink. - GhostAnime |
Simply do it as any other function would be done:
world |
In response to Nadrew
|
|
Yep. You should be able to call the Reboot() with extra arguments and override to make special use of them, like reason and a customized timer time. Example:
world Something nice you could do in the time portion, is allow GMs to cancel the reboot (use a global var, and check it). :) |
In response to Kaioken
|
|
world << "The world will reboot in [secs] seconds! [reason :((reason: [reason])) ? ""]" You've messed up your syntax there. world << "The world will reboot in [secs] seconds! [reason?"reason: [reason]":""]" |
In response to Nadrew
|
|
I believe he wants to 'rewrite' it, such as 'duplicate' that function as an alternate procedure, which, in this case, is impossible.
|
In response to DivineO'peanut
|
|
DivineO'peanut wrote:
I believe he wants to 'rewrite' it, such as 'duplicate' that function as an alternate procedure, which, in this case, is impossible. Wouldn't something like this work? proc/Reboot(reason,text_reason) //acts same as reboot, but a reason is provided Albeit not having the ability to determine who pressed CTRL+R with reason 2, the rest should work. |
Quest Industries wrote:
I am not really sure if there is a way to do it, but how would I go about rewriting Dream Seeker options such as World Reboot? Yes, world/Reboot() allows you to override it. I added an argument to it sometime back that would tell it how it was called, so you could specifically refuse a machine-driven reboot but still allow a user reboot. In Incursion, I tied this into my AreYouSure library so I could ask the host if they wanted to continue. Lummox JR |
In response to Jp
|
|
Jp wrote:
world << "The world will reboot in [secs] seconds! [reason :((reason: [reason])) ? ""]" You've messed up your syntax there. > world << "The world will reboot in [secs] seconds! [reason?"reason: [reason]":""]" Or better still: world << "The world will reboot in [secs] second\s![reason && "\n([reason])"]" In general it's best not to give this warning every second. I'd give it at the 5 minute, 2 minute, 1 minute, 15 second, and 5 second intervals. So even better still: var/rebootid To initiate a reboot, just call world.Reboot(0,"because I feel like it") or such. To cancel a reboot, just use ++rebootid and this will stop the current reboot loop in its tracks. proc/CancelReboot() Lummox JR |
In response to Quest Industries
|
|
Ah, I see now. Thank you for your help.
|
What are you planning to do?
You can make a new procedure or something similar to basically re-route what you want (a work-around basically) or modify Reboot() as how the others stated.
So once again, what do you want done so we can help you.
- GhostAnime