StepHeight and SetLODDistance

Topics regarding Scripting with Reality Factory
Post Reply
Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

StepHeight and SetLODDistance

Post by Veleran » Wed Sep 10, 2008 7:01 am

I added these commands in the settup part of the genericmonster script.
I raised a short and narrow wall 10 units tall to prevent the pawns from falling of the cliffs and the stepheight command didnt work until i placed the commands at the top of settup-why is that?
And,i still dont get the effects of the SetLODDistance,and i dont see why.


Console(true);
SetLODDistance("50", "60", "70", "80", "90", "100"); // show actor level of detail ditances
StepHeight("2");
Scale(SCALE); // scale the actor
if(BOXWIDTH > 0)
{
BoxWidth(BOXWIDTH*SCALE); // set bounding box width/depth
}
AttributeOrder(HEALTHATTRIBUTE, HEALTH, "Death"); // give monster health
HostilePlayer(HOSTILEPLAYER); // set who monster is hostile to
HostileSame(HOSTILESAME);
HostileDifferent(HOSTILEDIFFERENT);
SetFOV(170, "BIP 01 HEAD"); // set the bone that the eyes are located to
SetGroup(GROUP); // assign a group to belong to

FindTargetOrder(SIGHTDIST, "FoundTarget", DAMAGEATTRIBUTE); // seen a target to chase
AddPainOrder("IdlePain", 100); // show pain and trigger alert
AvoidOrder("Avoidance");
AddTriggerOrder("IdleToAlert", ALERTTRIGGER, 0); // go to alert when triggered
RotateToPoint(STAND, YAWSPEED, false, ""); // go to point if any specified
MoveToPoint(WALK, WALKSPEED*SCALE, "");
if(PATROL = false)
{
NewOrder("Idle");
}
else
{
NewOrder("Alert");
}
} ]

User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: StepHeight and SetLODDistance

Post by Juutis » Wed Sep 10, 2008 10:08 am

Code: Select all

SetLODDistance("50", "60", "70", "80", "90", "100"); // show actor level of detail ditances
StepHeight("2");
You're having quotation marks in your numbers. That makes them strings instead of floats which they should be. Also, your LOD distances are a bit small. Of course it depends on the size of your world but 100 is still quite a short distance. So:

Code: Select all

SetLODDistance(50, 60, 70, 80, 90, 100); // show actor level of detail ditances
StepHeight(2);
Pain is only psychological.

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: StepHeight and SetLODDistance

Post by Veleran » Wed Sep 10, 2008 11:07 am

I removed the "",and corrected the lod distances from six to 5.Still it does nt override the environment lod distances and does nt work.
I used small numbers for lod,so i dont have to zoom out much or move away too far to see the effect.

User avatar
bernie
RF Moderator
Posts: 1249
Joined: Tue Nov 15, 2005 10:07 am
Location: Ireland

Re: StepHeight and SetLODDistance

Post by bernie » Wed Sep 10, 2008 11:45 am

Still it does nt override the environment lod distances and does nt work.
yes I tried this some time ago and came to the same conclusion.

Post Reply