Zabaware Support Forums

Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: systemshock on February 20, 2013, 11:02:39 am

Title: System shock help me trigger functions by time
Post by: systemshock 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.
Title: Re: System shock help me trigger functions by time
Post by: One on February 20, 2013, 12:47:43 pm
Invest in a clock. :o
Title: Re: System shock help me trigger functions by time
Post by: One 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
Title: Re: System shock help me trigger functions by time
Post by: One 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
Title: Re: System shock help me trigger functions by time
Post by: One 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 >:(
Title: Re: System shock help me trigger functions by time
Post by: Carl2 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
Title: Re: System shock help me trigger functions by time
Post by: cload 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
Title: Re: System shock help me trigger functions by time
Post by: freddy888 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.