Jump to content


Photo

DayNight


  • Please log in to reply
6 replies to this topic

#1 Thauron

Thauron
  • Member
  • 216 posts

Posted 02 February 2006 - 03:41 AM

Hello, I have a small question.
I know that one can set the time of day with the command DayNight()
But what I wanted to do is to just add 2 or 3 hours to the actual time (which can be any time) - during which CHARNAME and company are busy doing something.
I know, I could use something like
IF
Time(1)
THEN
RESPONSE #100
DayNight(4)
END
But that would mean I would have to write 24 of these scripts! :wacko: (or less if I would use the TimeOfDay() trigger, but still more work than it's worth, IMO.)

So is there a command like AddTime(2) or somesuch - I couldn't find any through IESDP - or is there another economic way to try to achieve this?

Thanx

#2 Meira

Meira

    I'm the snow on your lips

  • Member
  • 411 posts

Posted 02 February 2006 - 08:41 AM

Is it absolutely necessary that time actually passes? Couldn't you just fake it by fading the screen to black and back? The game uses that to imply passing of the time. For example I looked Crowell's script, dialogue, area script of the smithy and the cutscene involved in forging the items and there is no actual passing of the time even though he says that he will need you to work for him a full day. Unless the action hidden somehere else. :)
Ihmeellinen meri

Kummalliset kalat liukuvat syvyydessä,
tuntemattomat kukat loistavat rannalla;
olen nähnyt punaista ja keltaista ja kaikki toiset värit -
mutta ihana meri on vaarallista nähdä,
se herättää tulevien seikkailujen janon:
mitä on tapahtunut sadussa, on tapahtuva minullekin.

- Edith Södergran


Amber - The BG2 NPC Mod Project Now released!
Amber's discussion forum at Gibberlings 3

#3 Thauron

Thauron
  • Member
  • 216 posts

Posted 02 February 2006 - 08:50 AM

That's how I do it right now, yes. But I was just wondering if I could really change time however I wanted.
So, if even Bioware fakes it, I will have to do that too, I suppose. It wasn't that important anyway, as you probably already guessed. ;)

#4 Stone Wolf

Stone Wolf
  • Member
  • 1672 posts

Posted 02 February 2006 - 11:58 AM

Well, according to iesdp you can change to any specific hour by using a numerical value from 0-23, but I haven't figured out any way to simply advance the clock by a certain number of hours. Well, you could always use Wait with a rather large value, but players probably wouldn't enjoy that too much. ;)

#5 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 02 February 2006 - 12:32 PM

I was just thinking that you could probably create a clock using the game time and globaltimer. You create a script that tracks when it is a certain time and matches this time with a global value. Then when you need to increase the time you increment the global value by the number of hours you need and use another script to set the time to match the global value.

Does that make sense?
A knight without armour in a savage land...

#6 Thauron

Thauron
  • Member
  • 216 posts

Posted 02 February 2006 - 01:20 PM

I was just thinking that you could probably create a clock using the game time and globaltimer. You create a script that tracks when it is a certain time and matches this time with a global value. Then when you need to increase the time you increment the global value by the number of hours you need and use another script to set the time to match the global value.

Does that make sense?


Actually, it does - after I reread for the third time, that is. But I am wondering if it would help me and if it's doable. It's whole lot of work to set the global though (well 24 IFs only to set the global). Would it not be as much work as when you just do IF Time(X) THEN DayNight(X+3)? - and since it is a part of a cutscene or area script that would mean I have to multiply this script 24 times too. Or am I missing something?

The same thought crossed my mind too, Stone Wolf. But for some dark reason I rejected it, though I can't really remember why :P .

#7 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 02 February 2006 - 03:07 PM

No it is not like that Thauron. Since I don't know what you exactly want I'll try and explain globally. There is a dialog which you give a global that goes from 0 to 1. We will call it globalX. Now you make a script (not a cutscene) that if globalX is 1, globaltimer(globalXdone) begins to count for four hours and you let globalX go to 2. After 4 hours the timer is done. Now there is a second dialog that triggers if GlobalX is 2 and the timer is finished. This way you have 4 hours between the two conversations. Though it might not be totally what your looking for, as I believe you wish it to happen immediatly, but that is how it works with the timer.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~