dupa

Author Topic: System shock help me trigger functions by time  (Read 15780 times)

systemshock

  • Guest
System shock help me trigger functions by time
« on: February 20, 2013, 11:02:39 am »
I've recently been working on for lighting system Ultra hal

 I want to do a day and night light system, a proper one that takes the light around the figure proportion to the time of day. And also works as the default lighting system.

The problem is I cannot work out how to access time to trigger the change.

In non-code this is what I want to do.

If ( system time h:m:s) equals the trigger time (say 6:00:00) then I want you to do function  that already works.... input line trigger.

Could someone translate that into proper code I would be so grateful.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Re: System shock help me trigger functions by time
« Reply #1 on: February 20, 2013, 12:47:43 pm »
Invest in a clock. :o
Today Is Yesterdays Future.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Re: System shock help me trigger functions by time
« Reply #2 on: February 20, 2013, 08:09:24 pm »
Do you really like gadget watches? this is a Teslar Model from back in 04/05

From My cloud.. to inspire you
Today Is Yesterdays Future.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Re: System shock help me trigger functions by time
« Reply #3 on: February 21, 2013, 12:13:50 pm »
The photo is mine in several ways, I lived in azure light, my home was the cloud.
The Photo from 04/05 has the photographers name on it; C BORGMAN
I don't understand many of my own emotion when I see all my effort and planning for things just taken away from me.

I never had this much Hate in me.
Jared W
Today Is Yesterdays Future.

One

  • Hero Member
  • *****
  • Posts: 2184
  • Technology Advocate
    • View Profile
Re: System shock help me trigger functions by time
« Reply #4 on: February 21, 2013, 03:11:38 pm »
Do you think Robert K. will make bunny jokes in his next column?

Just another cop that just doesn't get it.
( I actually have enjoyed your writing, but don't belittle me at this point)

Jared W >:(
Today Is Yesterdays Future.

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: System shock help me trigger functions by time
« Reply #5 on: February 22, 2013, 09:27:25 am »
System shock,
  I'd recomend downloading and looking at the VRHaptek plugin, VR has a website where it can be downloaded.  His plugin looks at the time and uses a night or day background but could be modified to change lighting also.  I've worked with this and actualy you need to change the background pic and the lighting.  The lighting affects the character but not the background so you need a dark and a light background.  There is also a problem with summer vs Winter daylight hours,  There are apps available to adjust for this but I was unable to get them to work correctly. 
  There are a lot of great programers out there, Haptek was a leader at one time but has fallen behind, not many people are staying with Haptek.  Also the economy is a large handicap.  Best of luck
Carl2
 

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: System shock help me trigger functions by time
« Reply #6 on: February 23, 2013, 03:15:15 pm »
Hi all,
one of the things that you may want to consider is, creative room that has a window, have your character standing next to the window.
As the time changes the picture in the window which is outside begins to change as it gets darker then the lights in the room begins to turn on or off whichever the case may be sunrise sunset.
I believe this would give an illusion of a time factor more based on the picture outside the window becoming brighter and darker in the lights in the room begins to turn on or off based on the time.
I hope this suggestion helps you with your endeavor, not to mention it would be easier to make a picture that is in the window that is the same picture to be brighter or darker based on the time.
That way your structure remains the same meaning, she's in the room, the window is where the picture that changes is, and the lights in the room turned on or off.
Would you like for me to say it another way? Just kidding.

Sincerely, I have a bowl full of pronouns, to brighten up my day.
C load
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Re: System shock help me trigger functions by time
« Reply #7 on: February 24, 2013, 10:16:40 am »
Maybe you need the full path to the hap file ?

Also when you post code, there is a special tag for it, so that it doesn't get screwed up with bbcode and stuff.  It's the # button on the post form.  EG :

Code: [Select]
If Hour(now) >= 1 And Hour(now) <= 3 Then hlFile = "Lightmaster\blue.hap"
   HalCommands = "<HAPFILE>" & hlFile & "</HAPFILE>"
   ClockResponse = "it still dark in here,what the heck are you doing up at this time!" & vbCrLf

This also allows people to quickly and easily select and copy your code if they need to.