Game Development Community

Day/Night cycle for TGEA v2

by Kevin Mitchell · in Torque Game Engine Advanced · 12/07/2008 (8:22 am) · 7 replies

Can anyone get this resource working for TGEA?
I keet betting something about:

Day/Night cycle for TGEA v2

scriptsAndAssets/MainFrame/Systems/dayLightSystem.cs (172): Unknown command inspectPostApply.


for

$Sun1.inspectPostApply();

#1
12/07/2008 (9:04 am)
Which day/night cycle resource are you using? There are several floating around.
#2
12/07/2008 (9:26 am)
Day/Night cycle for TGEA v2

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=13408
#3
12/08/2008 (7:10 am)
Any one have any ideas before i try to re invent the wheel?
#4
12/08/2008 (9:36 am)
I don't think that inspectPostApply is available on the sun object. If I recall correctly it was removed a few versions ago but its really easy to add back in (if I had the engine source in front of me right now I would tell you exactly what to do -- if you search around yourself you'll see how to do it).

Something else you can try to force the changes to propogate is a little trick that also works on changing static objects. After you modify your sun object set its scale to its current scale (or, if you know it will always be "1 1 1" you could just do that.

After you change the sun settings try doing the following where you are expecting to call inspectPostApply:
$Sun1.setScale($Sun1.getScale());

you could alternatively do: $Sun1.setScale("1 1 1");
#5
12/08/2008 (10:24 am)
You should take a look at this. I started off with the Day/Night cycle resource, but I found this resource to be WAY better (for me anyway).

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=15391

it extends to a yearly cycle as well. it also has a weather cycle to match the season that you are in, (snow in winter, lightning, rain. sunny bright days in summer.)
and I use it in 1.7.1
#6
12/08/2008 (10:51 am)
The resource mentioned by deepscratch works near flawlessly and is more than just a DRL hack like the other resource.
#7
12/08/2008 (11:26 am)
That script is so beautiful I can't wait till i get home to try it. Thanks.