|
1 registered members (AndrewAMD),
1,361
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Moving sun?
#10911
11/13/02 09:34
11/13/02 09:34
|
Anonymous
OP
Unregistered
|
Anonymous
OP
Unregistered
|
Is there a script or something that can make a sun rise and set? Also like every 10 mins mars would show? Thanks in advance.
|
|
|
Re: Moving sun?
#10912
11/14/02 07:15
11/14/02 07:15
|
Joined: Nov 2001
Posts: 1,402 U.S.A.
NoelCower
Expert
|
Expert
Joined: Nov 2001
Posts: 1,402
U.S.A.
|
This is actually quite simple. I made a script for this and then ditched it for the time until I needed it, later I'll see if I can post it.
![](http://nrc-art.info/patchy.png) Noel R. Cower Portfolio
Athlon 64 3000+, 1GB RAM, 400GB HDD, Radeon X800 XT
Onboard Realtek 7.1 Audio, WinXP Home SP2, Slackware 10.0
|
|
|
Re: Moving sun?
#10913
11/14/02 13:55
11/14/02 13:55
|
Joined: Nov 2001
Posts: 1,402 U.S.A.
NoelCower
Expert
|
Expert
Joined: Nov 2001
Posts: 1,402
U.S.A.
|
Here is the sun rise/set script. code:
// Starting of sunset code
function day_pass() { sun_angle.tilt = 0.2; while (1) { sun_angle.tilt += 5 * TIME; if ( sun_angle.tilt == 90 && sun_angle.pan == 0 ) { sun_angle.pan = 360; } else { sun_angle.pan = 0; minutes_to_mars += 1; } // Every time this happens add a 1 to the variable minutes_to_mars, you would have to slow this script down a LOT though, right now it is sped up for testing purposes /*then add this*/ if ( minutes_to_mars >= 10 ) { mars.visible = on; } else { mars.visible = off; } wait(6); } }
// Ending of sunset code
With a few tweaks to that you could easily get the Mars thing going. Read the comments I've added to the code for examples.
I'm sorry, this is probably not a very clean or efficient script but it will probably get the job done till you learn to script, assuming you'll take the time to (it really is worth it 'cause then you can have FUN [yes, I said it is fun] making stuff happen).
![](http://nrc-art.info/patchy.png) Noel R. Cower Portfolio
Athlon 64 3000+, 1GB RAM, 400GB HDD, Radeon X800 XT
Onboard Realtek 7.1 Audio, WinXP Home SP2, Slackware 10.0
|
|
|
Re: Moving sun?
#10914
11/15/02 04:26
11/15/02 04:26
|
Anonymous
OP
Unregistered
|
Anonymous
OP
Unregistered
|
Thanks but what file do I edit? is it the file name.wdl?
|
|
|
Re: Moving sun?
#10915
11/15/02 07:38
11/15/02 07:38
|
Joined: Nov 2001
Posts: 1,402 U.S.A.
NoelCower
Expert
|
Expert
Joined: Nov 2001
Posts: 1,402
U.S.A.
|
You can either make this in a seperate WDL file or you can add it to your level's main WDL file.
![](http://nrc-art.info/patchy.png) Noel R. Cower Portfolio
Athlon 64 3000+, 1GB RAM, 400GB HDD, Radeon X800 XT
Onboard Realtek 7.1 Audio, WinXP Home SP2, Slackware 10.0
|
|
|
|
|
|