Skydome Issues

Topics regarding Scripting with Reality Factory
Post Reply
Jaguar_jwg
Posts: 96
Joined: Sun May 20, 2007 7:47 am

Skydome Issues

Post by Jaguar_jwg »

My player is covered to his chest in terrain.

I am using this script for my skydome:
// Example Skydome Scripts:
// -----------------------------------
// Entity Properties
// -----------------------------------
// InitOrder - "Initialize"
// StartOrder - "Start"
// -----------------------------------
//--------------------------------Script starts
here.................................//

{

Initialize[ ()
{
DisableSun(false);
DisableCloud(false);
SetLocation(-23, 6, 12, 24);
SetSunScale(-100);
SetHeightOrigin(0);
SetMoonColor(255, 255, 255, 255);
SetMoonPhase(2);
SetSkyColor(164, 200, 255, 255);

} ]

Start[ ()
{
SetTimeScale(25);
RenderWireframe(false);
ToggleMoveWithCamera(true);
SetTwilightColor(255,25,255,200);

} ]

}

//begin skydome script;
//have done this with the skydome entity using this script:

//Code:

{
Init[ ()
{
SetLandscapeSize(40200);
SetSkyDome(4920, 128);
SetVertScale(1);
SetHorizScale(1);
SetHeightOrigin(-128);
SetDesiredTriangles(512);
SetSkyTexture("cloud.bmp");
SetSkyColor(164, 200, 255, 255);
DisableSun(false);
SetSunScale(64);
SetSunColor(255, 128, 0, 255);
DisableCloud(false);
SetDistanceFromSunFactor(40200);
SetMoonColor(255, 255, 255, 255);
SetMoonPhase(2);
SetLocation(40, 6, 23, 5);
SetTimeScale(60);
UseSkyFog(true);
SetAmbientLightColor(255,255,255,0);
self.time;
self.daytime;
} ]
Run[ ()
{
SetWindDirection("east");
} ]
}

//end skydome script

I am using a skybox with these measurements:
Y size is 512 pixels (-256 to 256). X size is 1500, and Z size is 512.
My terrain is dead center. It is about 100 pixels high (from about -65 to 25 pixels). The surface is at 0.
I placed the skydome entity below my terrain (below -60). Even when I place it way below, it makes no difference. I changed the SetHeightOrigin() to –a lot, and it made no difference. My player continues to be engulfed in the skydomes terrain as though he is walking in a sea of sand. Can someone help me sort this out.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

perhaps scale down your actor,unless your saying hes still the right size,just sunk into the ground.
Once I was sad, and I stopped being sad and was awesome instead.
True story.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

lower the value for SetHeightOrigin(0) - maybe to -64 or even lower.

EDIT: I suppose you used the second script? It's not that clear in your post... Or are they both in one??? if this is the case it won't work, because you finished the script already with the '}' and then you start it again with '{' (i hope this is not too theorethically). This confuses the script reader and it will set back the skydome to its defaults. Look in the RealityFactory.log if you find something like 'ReaderScriptError' and then the filename of your script.
Maybe you comment out the first script then??? (if this is the case)
Last edited by Jay on Sat Jun 02, 2007 10:19 pm, edited 1 time in total.
Everyone can see the difficult, but only the wise can see the simple.
-----
Jaguar_jwg
Posts: 96
Joined: Sun May 20, 2007 7:47 am

Post by Jaguar_jwg »

I lowered the SetHeightOrigin(0) to -128. No change.
However, you are right. I was using both scripts. I fixed that, and I am now using one. The terrain does not budge. It remains the same. I’ve tried everything I can think of. Maybe you can look at it yourself, and see if you can find out what I did wrong. Here is the link:
http://www.keepmyfile.com/download/4fce051635410
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

I guess the comments before the actual script mess it up. After removing them the script works fine for me.
Pain is only psychological.
Jaguar_jwg
Posts: 96
Joined: Sun May 20, 2007 7:47 am

Post by Jaguar_jwg »

Thanks for looking into it.
I found the problem.
The surface of my terrain was below 0.
There's one problem that wouldn't be licking me anymore.
Thanks for your help. :D
Post Reply