Dynamic Time/Weather Script
I wasn't going to release this because I made it for someones map.
But I'm starting to doubt they were going to give me credit for it so I'm releasing it. I personally havn't tested it but It seemed to work perfectly in his map.
Quote:
Originally Posted by Malolo420
Make 2 bsps, (the same one but different bsp files {for different skys make +sky in the second bsp +sk1)
Then make a biped and a vehicle out of view and 2 cutscene flags(1 where vehicle is and 1 ontop of biped), name the biped syncbip and the vehicle synchog and the flag at vehicle vehistart, and the other one killbip (for my script, you can change names).
Then just compile my script and it will switch skys every 5 minutes.
Code:
(global boolean is_server false)
(script continuous nightsky
(sleep_until (= (unit_get_health syncbip) 0) 15)
(if (= (structure_bsp_index) 0)
(begin
(set is_server true)
(switch_bsp 1)
(sleep 9000)
(object_create_anew syncbip)
)))
(script continuous killbiped
(if (= (unit_get_health syncbip) 0.0)
(begin
(object_teleport synchog killbip)
)))
(script continuous daysky
(sleep_until (= (unit_get_health syncbip) 1) 15)
(if (= (structure_bsp_index) 1)
(begin
(set is_server true)
(switch_bsp 0)
)))
(script continuous bipedkill
(if (= (unit_get_health syncbip) 1)
(begin
(set is_server true)
(sleep 9000)
(object_teleport synchog killbip)
(sleep 60)
(object_teleport synchog vehistart)
)))
Re: Dynamic Time/Weather Script
Just what some of us wanted. Nice work :) +Rep
Re: Dynamic Time/Weather Script
Don't BSP switches normally cause exceptions?
I wrote one of these for an old project, everyone exceptioned every 5 seconds, lol.
Re: Dynamic Time/Weather Script
Quote:
Originally Posted by
Jay2645
Don't BSP switches normally cause exceptions?
I wrote one of these for an old project, everyone exceptioned every 5 seconds, lol.
I think Jahrain did this a while ago as well, and it seemed to work
Re: Dynamic Time/Weather Script
Must have done something wrong then, lol.
Re: Dynamic Time/Weather Script
Quote:
Originally Posted by
SuperSunny
I think Jahrain did this a while ago as well, and it seemed to work
Yea, jahrain did it many moons ago. 'Cept his was in BG and it went from dawn, to noon, to sunset, to night
Re: Dynamic Time/Weather Script
Thats what the guy I made it for did to, cept it didn't sync well so he went back to just day and night.
Re: Dynamic Time/Weather Script
Quote:
Originally Posted by
Kalubâ„¢
Yea, jahrain did it many moons ago. 'Cept his was in BG and it went from dawn, to noon, to sunset, to night
Was this released? I would like to see how smooth/rough it is.
Re: Dynamic Time/Weather Script
Very useful, I would like to see this done in more maps.
Re: Dynamic Time/Weather Script
Quote:
Originally Posted by
SuperSunny
I think Jahrain did this a while ago as well, and it seemed to work
agreed, Jahrain already did it, but I thought it had sync issues, but I forget really so idk...