proc/storm(var/turf/stormie/src)
sleep(520)
src.overlays+='rain.dmi'
src.overlays+='flash.dmi'
sleep(1)
src.overlays-='flash.dmi'
storm()
errors:
loading Air Master.dme
Air Master.dm:3:error:src.overlays:undefined type: src.overlays
Air Master.dm:4:error:src.overlays:undefined type: src.overlays
Air Master.dm:6:error:src.overlays:undefined type: src.overlays
Air Master.dmb - 3 errors, 0 warnings (double-click on an error to jump to it)
ID:177995
Jul 1 2002, 10:52 pm
|
|
Jul 1 2002, 10:54 pm
|
|
Is this storm suppose to hover over the user?
|
In response to ShadowSiientx
|
|
sigh...I know, but is suppose to storm the WHOLE world?
|
In response to ADDiCt
|
|
ONLY THE TURF STORMIE!!!
|
In response to ADDiCt
|
|
no
|
ShadowSiientx wrote:
proc/storm(var/turf/stormie/src) First, src is automatic. Using it as the name of an argument is confusing BYOND. You should either define this as a /turf/stormie proc and dump the argument altogether: turf/stormie/proc/storm() or use some other var name for the argument and change "src" to that var name throuout the proc: proc/storm(turf/stormie/S) // note: no need for the leading var/ in argument definition sleep(520)<font size=1>. . .</font> storm() This is not a good way to loop a proc. Each time you execute a proc, DM remembers where the proc was called from so it can return there later. sleep() doesn't start a new execution thread, so the procs never return. If the proc doesn't return, it just keeps adding overhead until your computer begins to lag and eventually crashes. If you want the proc to call itself you should use spawn. spawn() starts a new execution thread, so the old proc can return and free up the overhead used to remember where the proc call came from. proc/storm()<font size=1> . . .</font> spawn(520) storm() If you want to use sleep(), you can use a while() loop. The proc won't have to call itself. proc/storm() while(1) // this loop will go on forever<font size=1> . . .</font> |