ID:170447
![]() Jan 22 2005, 9:08 pm
|
|
How would I cause a repeated check upon world new until the game closes down, Like call a proc every so often . Please help if you can. Also I need to know how to repeat a verb or call it again after it is done.
|
Meh, What i'm trying to do is make it call the Repop proc every so often, but what you put works for self coded procs. >.<
|
Thanks, you wouldn't happen to know how to save turf vars. That has been the most annoying thing ever to me.
|
Um, I get one hell of an error when I use the thing. When I open the game it lags Tremendously(Spellcheckthat) this only happens when i use the whole world/New() >.<
|
Every spawn(20) for testing. Lol I don't think thats causing it When i use world/New() for some reason it lags my game and won't run. Weird
|
Did you add "..()" under world/New()?
(I forgot to do it, I know) And spawn(20) should -kind of- lag it. It repops every 2 seconds. o.o |
world/New() //---Call world/New() Technically, I like using repop in a proc, instead of using the built-in one in world/New(). Or you can just dump the whol proc version and go with this: world/New() |
The problem with all the approaches to infinite loops in this thread is that they alll overlook one critical fact... world/New() must be allowed to return! You must spawn() the loop itself, not just the contents of the loop.
What do I mean? I mean this... world/New() Notice how world/New() will return immediately. That's one valid approach. Here's the other common version: world/New() Both of these work fine. Some people prefer one over the other - the first version is arguably slightly more efficient (though the difference is so slight that you'd never notice it in a million years), but the second version is more convenient to profile using the Profile World feature in Dream Seeker (which only works when debug mode is on for your project). |
Then, in your proc, have it call itsself at the end. This is called recursion.
As for the verbs, it can't be done. Verbs are activated by the player using macros or statpanel. But you could make the verb call a proc that uses recursion.
Prodigal Squirrel