| Blockland Forums > Modification Help |
| Schedule Help |
| (1/4) > >> |
| Jasa 12265:
Here's something I worked up, I am unfamiliar on how to do schedules so tell me what to fix. --- Code: ---package DayAndNight { schedule(240000, 0, Time4, %obj); { function Time4(%obj) { new Sky(Sky) { position = "336 136 0"; rotation = "0 0 1 0"; scale = "1 1 1"; materialList = "base/data/skies/Sky_Default/resource.dml"; cloudHeightPer[0] = "0.0"; cloudHeightPer[1] = "0.0"; cloudHeightPer[2] = "0.0"; cloudSpeed1 = "0.0"; cloudSpeed2 = "0.0"; cloudSpeed3 = "0.0"; visibleDistance = "750"; fogDistance = "500" fogColor = "0.000000 0.000000 0.100000 1.000000"; fogStorm1 = "0"; fogStorm2 = "0"; fogStorm3 = "0"; fogVolume1 = "0 0 0"; fogVolume2 = "0 0 0"; fogVolume3 = "0 0 0"; fogVolumeColor1 = "128.000000 128.000000 128.000000 0.000000"; fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000"; fogVolumeColor3 = "128.000000 128.000000 128.000000 0.000000"; windVelocity = "0 0 0"; windEffectPrecipitation = "1"; SkySolidColor = "0.000000 0.000000 0.200000 1.000000"; useSkyTextures = "0"; renderBottomTexture = "0"; noRenderBans = "0"; } } } --- End code --- This isn't all, it basically repeats like that with the activatepackage at the end. |
| Uristqwerty:
Schedule is like echo(), it doesn't define a block of code. Put the schedule() line outside of the package or inside of a function, and don't put a set of {}s after it. |
| Jasa 12265:
I tried --- Code: ---package DayAndNight { schedule(240000) function Time4(%obj) { new Sky(Sky) { position = "336 136 0"; rotation = "0 0 1 0"; scale = "1 1 1"; materialList = "base/data/skies/Sky_Default/resource.dml"; cloudHeightPer[0] = "0.0"; cloudHeightPer[1] = "0.0"; cloudHeightPer[2] = "0.0"; cloudSpeed1 = "0.0"; cloudSpeed2 = "0.0"; cloudSpeed3 = "0.0"; visibleDistance = "750"; fogDistance = "500" fogColor = "0.000000 0.000000 0.100000 1.000000"; fogStorm1 = "0"; fogStorm2 = "0"; fogStorm3 = "0"; fogVolume1 = "0 0 0"; fogVolume2 = "0 0 0"; fogVolume3 = "0 0 0"; fogVolumeColor1 = "128.000000 128.000000 128.000000 0.000000"; fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000"; fogVolumeColor3 = "128.000000 128.000000 128.000000 0.000000"; windVelocity = "0 0 0"; windEffectPrecipitation = "1"; SkySolidColor = "0.000000 0.000000 0.200000 1.000000"; useSkyTextures = "0"; renderBottomTexture = "0"; noRenderBans = "0"; } } --- End code --- But that didn't work. Anything about the ;'s? |
| Chrono:
Put it inside time4, give it an actual function to call, a ; after the } on the new sky and the package, but not the function. |
| phflack:
try function name(%argument) { //stuff schedule(delay, 0, name, %argument); } (for the function) |
| Navigation |
| Message Index |
| Next page |