75 lines
4.2 KiB
HTML
75 lines
4.2 KiB
HTML
<html><head>
|
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252"><meta content="True" name="vs_showGrid">
|
|
<style type="text/css">#play_btn_up { position:fixed; right:0; bottom:53%;z-index:1001; height:36px; width:36px; cursor:pointer; background:url(data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAUCAYAAACAl21KAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB+SURBVDhPY1i1atV/amAGahgCMoNhaIGlS5cKAp19BoRBbLJcj2QILDJINwzoAmMgfoclIkBixkS5DI8hMJcRNgxoSBoOl6CnNZBhaVhdBjWE1MSJahjQkA4KEmYH2GUrV66cSYEhYB+AzKBtFiHkQqKiH6Ro1CDCQTWgYQQAs81DU0G/83sAAAAASUVORK5CYII=) no-repeat scroll 50% 50% rgba(0, 0, 0, 0.7); border-radius:5px 0 0 5px; margin-top:-24px; }#play_btn_dn { position:fixed; right:0; top:53%; z-index:1001; height:36px; width:36px; cursor:pointer; background:url(data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAUCAYAAACAl21KAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACPSURBVDhPY2DAAlatWvUfH8amB6vYqEGEg2pgw4iQ7cTKM6xcuXImsYpxqQOZAQ4woIIOCgzrQAl1oEFpZBiWhitFgwx7R4SBIDXYDYGZDFRgTMAwkCHGhBMRJMxwGUa8ITCbli5dKgg08AySN8+AxIhyCboiJMPIN4Qsm6miiYioxltawvSDYogohYTUAQC80UNTOht/YwAAAABJRU5ErkJggg==) no-repeat scroll 50% 50% rgba(0, 0, 0, 0.7); border-radius:5px 0 0 5px; margin-top:-24px; }.play_btn { -webkit-transition-duration:0.5s linear; -o-transition-duration:0.5s linear; -moz-transition-duration:0.5s linear; transition-duration:0.5s linear; opacity:0.65; }.play_btn:hover { opacity:1; }</style></head><body><p><font size="5"> AI Visibility</font></p>
|
|
<p>You have three ways to play with the AI view distances. They all work at
|
|
the same time, so a character's vis value is: Lua * Foliage * Region</p>
|
|
<hr>
|
|
<p></p>
|
|
<p><strong>Lua Vis Factor</strong></p>
|
|
<p>You can set the overall view distance in the level lua:</p>
|
|
<pre> SetAIViewMultiplier(0.45)
|
|
</pre>
|
|
<p>
|
|
That means that over the entire level, AI can see 45% as far as normal.
|
|
</p><p>
|
|
</p><hr>
|
|
<p></p>
|
|
<p></p>
|
|
<p>
|
|
</p><p><strong>Foliage Vis Factors</strong></p>
|
|
<p>You can set visibility modifiers on foliage, which, for example, allows you
|
|
to hide inside bushes on endor. Do this by adding a line into the .prp
|
|
(foliage prop file) for the level. As an example, here is layer from the endor
|
|
prop file ("worlds/end/world1/end.prp"):</p>
|
|
<pre>Layer(1)
|
|
{
|
|
SpreadFactor(0.5);
|
|
Mesh()
|
|
{
|
|
File("end_prop_fern5.msh", 30);
|
|
Frequency(20);
|
|
Scale(1);
|
|
Stiffness(0.0);
|
|
CollisionSound("foliage_collision");
|
|
<font color="#ff0066"> AIVisibilityFactor(0.7,1.0);</font>
|
|
}
|
|
|
|
Mesh()
|
|
{
|
|
File("end_prop_treeclump_1.msh", 50);
|
|
Frequency(50);
|
|
Scale(1);
|
|
Stiffness(0.0);
|
|
CollisionSound("foliage_collision");
|
|
<font color="#ff0066"> AIVisibilityFactor(0.35,0.6);</font>
|
|
}
|
|
}
|
|
</pre>
|
|
<p>The two red lines should be added. You can adjust the visibility per model, with
|
|
a value for crouching and standing.</p>
|
|
<p>The first means that for the foliage model "end_prop_fern5", you will
|
|
be 70% visible from AI if you're crouched inside it, but 100% visible if
|
|
standing inside it.
|
|
</p>
|
|
<p>The second model ("end_prop_treeclump_1") will give you 35% visibility when
|
|
crouched, and 60% when standing.</p>
|
|
<p>
|
|
</p><hr>
|
|
<p></p>
|
|
<p></p>
|
|
<p><strong>AI Vis Regions</strong></p>
|
|
<p><img src="AI%20Visibility_files/aivisregion.jpg" width="393" height="341" align="right"> AI
|
|
Visibility Regions allow you to set regions in the world editor that affect the
|
|
AI's visibility of anything inside that region. Vis Regions work on both
|
|
players and AI, but not so well on vehicles.
|
|
</p>
|
|
<p>To make them in the editor, create a new region and hit the "Change Type" button
|
|
to select the type "AIVis".
|
|
</p>
|
|
<p>Then set the vis multipliers for crouch and stand. These are a multiplier
|
|
on normal visibility, so 0.5 means that you're 50% covered, while 2.0 would
|
|
mean that you're visible twice as far away as normal.</p>
|
|
<p>You can only be inside one vis region at a time, so if the regions overlap, it
|
|
will randomly pick one of them and use that value. This is fine as long
|
|
as the overlapping regions all have the same values.</p>
|
|
<span id="play_btn_up" class="play_btn" style="display: none;"></span><span id="play_btn_dn" class="play_btn"></span></body></html> |