Home   Help Search Login Register  

Author Topic: Sun info  (Read 2460 times)

0 Members and 1 Guest are viewing this topic.

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Sun info
« on: 03 Sep 2009, 10:53:23 »
Is there any way to get information on the sun's position? i.e. height or angle?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Sun info
« Reply #1 on: 03 Sep 2009, 13:38:38 »
Maybe, in theory.

It seems that the sun is sun.p3d (as far as I can tell) so in theory you might be able to find it with some of the nearestObject commands (like you find the trees I guess) and then calculate stuff with that data..
I doubt it's any way feasible though since you would have to search for the whole island area for the sun and that causes your search results to be in the hundreds of thousands of objects.. :dunno:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Trexian

  • Members
  • *
Re: Sun info
« Reply #2 on: 03 Sep 2009, 18:07:42 »
Based solely on gameplay, it seems as though there is some "trigger" (not like a script-trigger) that tells AI when they need to use NV goggles.  Any idea how that is accomplished?  Or get the current ambient lighting parameters?  I believe the notoriously circumspect DM is interested in figuring out how near to sunrise and sunset it is, when those times can vary by a couple hours depending on the season. :)

I have found the lightIsOn query, but that kind of binary result is pretty heavy-handed.
Sic semper tyrannosauro.

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Sun info
« Reply #3 on: 03 Sep 2009, 18:42:24 »
That's actually a very good point T, I hadn't considered the NV goggles or lights logic.