Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/26/24 12:45
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,361 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Moving sun? #10911
11/13/02 09:34
11/13/02 09:34

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



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 Offline
Expert
NoelCower  Offline
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.


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 Offline
Expert
NoelCower  Offline
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).


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

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



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 Offline
Expert
NoelCower  Offline
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.


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

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1