Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Real Time (or 1/2) Script

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Talic Blood
Berserker




Joined: 17 Mar 2003
Posts: 20
Location: The Void

PostPosted: Wed Mar 19, 2003 4:49 am    Post subject: Real Time (or 1/2) Script Reply with quote

I kinda need an idea of how to create a script that is in real time (maybe not our time, some faster) kinda like SOJ2 has. Any ideas?
_________________
"There is no subsitute for strength, and no excuse for the lack of it."
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Cube
Dimensional Traveller




Joined: 02 Feb 2003
Posts: 294

PostPosted: Wed Mar 19, 2003 7:25 am    Post subject: Reply with quote

Well it isn't too hard. I'll try to explain it the best I can.

It's basically a while do loop, with a variable that ranges from 0 to 3600. I use 3600 because that's how many seconds are in a hour (And most games base their days on an hourly basis). 3600 can also be divided evenly into quarters for how it should look during the day, and into hours (3600/24 = 150 ) evenly. Every 150 interval would mean an hour has gone by in the game world. That may not make much sense...But here's the script.

Now, this script is made to run on a single map. The condition may change, depending on how you want to use it.

global variable (number, time)

while (current map == 0) do (
wait (18 )
increment (time)
if (time >> 3600) then (
set variable (time, 0)
)
)


You may want to add other things in there as well, like:

if (time >= 900, and, time <= 0) then (
do whatever you want for the morning
)

That'd do commands for the morning. Actually, if you're wondering what the numbers are for each section of day:

0-900 = Morning
901-1800 = Afternoon
1801-2700 = Sunset
2700-3600 = Night

Also, in the wait command up in the while do loop is 18. On my computer that's about a second. Feel free to alter it if you don't want each day to be an hour long (Dimensions I is like a 6 or so making each day 15-20 mins long).

I dunno...I quickly put this together off the top of my head. Please, if you have any questions about it just post. I'd be happy to help further.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group