武装突袭 Wiki
探索
首页
讨论板
所有页面
社区页
交互式地图
最新博文
页面
最新页面
Contact Reports
Hotshot's Sandbox
DIK KeyCodes
Curator
武装突袭 Wiki
Product.cpp/bin File Format
Oxygen Light
最新博客
分类
Uploaded with UploadWizard
Face A2 Face101.jpg
Face A2 Face102.jpg
Face A2 Face103.jpg
Face A2 Face104.jpg
Face A2 Face105.jpg
Face A2 Face106.jpg
Face A2 Face107.jpg
含有损坏文件链接的页面
Eden Editor: Introduction
Eden Editor: Switching from 2D Editor
Eden Editor: Menu Bar
Eden Editor: Asset Browser
Eden Editor: Toolbar
Eden Editor: Status Bar
Eden Editor: Entity Attributes
社区
社区首页
社区中心
帮助中心
FANDOM
游戏
电影
电视
wiki
探索wiki
社区中心
创建wiki
尚未注册?
注册
登录
登录
注册
武装突袭 Wiki
4,828
个页面
探索
首页
讨论板
所有页面
社区页
交互式地图
最新博文
页面
最新页面
Contact Reports
Hotshot's Sandbox
DIK KeyCodes
Curator
武装突袭 Wiki
Product.cpp/bin File Format
Oxygen Light
最新博客
分类
Uploaded with UploadWizard
Face A2 Face101.jpg
Face A2 Face102.jpg
Face A2 Face103.jpg
Face A2 Face104.jpg
Face A2 Face105.jpg
Face A2 Face106.jpg
Face A2 Face107.jpg
含有损坏文件链接的页面
Eden Editor: Introduction
Eden Editor: Switching from 2D Editor
Eden Editor: Menu Bar
Eden Editor: Asset Browser
Eden Editor: Toolbar
Eden Editor: Status Bar
Eden Editor: Entity Attributes
社区
社区首页
社区中心
帮助中心
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
编辑“
SelectBestPlaces
”
返回页面
编辑
可视化编辑器
查看历史
讨论 (0)
正在编辑
SelectBestPlaces
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
{{Command|= Comments ____________________________________________________________________________________________ | arma2 |= Game name |1.00|= Game version ____________________________________________________________________________________________ | Find the places with the maximum value of ''expression'' in the given area. Places can be on water. Results are sorted by value. Search pattern is randomised every command execution. |= Description ____________________________________________________________________________________________ | '''selectBestPlaces''' [position, radius, expression, precision, sourcesCount] |= Syntax |p1= [position, radius, expression, precision, sourcesCount]: [[Array]] - |= PARAMETER1 |p2= position: [[Object]], [[Position3D]] or [[Position2D]]|= PARAMETER2 |p3= radius: [[Number]]|= PARAMETER3 |p4= expression: [[String]] - Arithmetic expression. Simple expression var names containing values from 0 to 1 depending on location (see also [[Ambient Parameters]]): * forest * trees * meadow * hills * houses * sea * night * rain * windy * deadBody * waterDepth * camDepth|= PARAMETER3 |p5= precision: [[Number]]|= PARAMETER3 |p6= sourcesCount: [[Number]] - max results to return|= PARAMETER3 | [[Array]] - in Format <nowiki>[[position: </nowiki>[[Position2D]]<nowiki>, expressionResult: </nowiki>[[Number]]<nowiki>], ...]</nowiki> |= RETURNVALUE |x1= <code>myPlaces = [[selectBestPlaces]] <nowiki>[</nowiki>[[position]] [[player]], 50, "meadow + 2*hills", 1, 5];</code>|= EXAMPLE1 ____________________________________________________________________________________________ | [[Ambient Parameters]], [[findEmptyPosition]], [[isFlatEmpty]] |= SEEALSO | |= MPBEHAVIOUR ____________________________________________________________________________________________ }} <h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <dd class="notedate"> <dd class="notedate">Posted on Jul 17, 2010 - 18:39 <dt class="note">'''[[User:Rübe|Rübe]]''' <dd class="note">see http://forums.bistudio.com/showthread.php?t=93897 for some more information (though neither official, nor complete). The most important information is the list of useable keywords for the expression which is: '''forest, trees, meadow, hills, houses, sea, night, rain, windy''' and '''deadBody'''. The keyword will be replaced by the actual value at the given sample position and thus the expression gets evaluated. For example the following expression (which returns high values in forest) ''"forest + trees - meadow - houses - (10 * sea)"'' might be transformed to ''0 + 0.1 - 0.7 - 0 - (10 * 0)'' which is - with it's result of -0.6 - not in the forest, though there are some tree(s) around. You get the idea.<br> Also note that you may aswell check such an expression value at a single position by passing a low radius and a sourceCount of 1, which is often just as useful as retrieving multiple (and already sorted) positions.<br> Also do not underestimate the keywords ''night, rain'' or ''windy'', for if you couple them with the other keywords, you can easily get a highly dynamic system at a very low cost. (this, btw., is how animals "choose" where and when to spawn) <dd class="notedate">Posted on Apr 3, 2014 - 16:10 <dt class="note">'''[[User:ffur2007slx2_5|ffur2007slx2_5]]'''<dd class="note"> In ArmA3 ver 1.14 Two new expressions are available: '''waterDepth'''(0-1) and '''camDepth'''(0-1), along with three simple operators: '''interpolate''', '''randomGen''' and '''factor''' that can be used together with expressions. E.g. <code> p = selectBestPlaces [ position player, 500, "(2 * (waterDepth interpolate [1,16,0,1]) * ((0.1+houses factor [0.1,0.8]) * (randomGen 1 + houses)))", 1, 1]; </code> '''A'''lgorithm randomGen: <code> randomGen A(number): randomly generate a float number from 0 - A </code> '''A'''lgorithm factor: <code> A(number) factor [p,q] = p< A <q: [(A -p)/(q-p)] </code> '''A'''lgorithm interpolate: <code> A(number) interpolate [p,q,r,s] = A <=p:r A >=q:s p< A <q: [(A -p)/(q-p)]*(s-r) +r </code> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3> [[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]] [[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] [[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] <!-- CONTINUE Notes --> <dl class="command_description"> <dd class="notedate">Posted on June 15, 2015 - 13:27 (UTC)</dd> <dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt> <dd class="note"> ''precision'' seems to have range 0 - 100. At very low values the command is extremely slow. 100 makes it quite fast. It looks like ''precision'' is some kind of grid search size. Large chunks make the search faster but less accurate. <br><br> Resulting array is [] if ''sourcesCount'' is 0 or '' expression'' is "". In all other cases it seems that result is array of arrays of the set max count. The sole indication of successful search is ''expressionResult'' value when it is > 0. </dd> </dl> <!-- DISCONTINUE Notes -->
摘要:
请注意在武装突袭 Wiki上的所有贡献都将依据CC-BY-SA进行发布。
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
Template:=
(
查看源代码
)
Template:Biki unified see also
(
查看源代码
)
Template:Busa
(
查看源代码
)
Template:Command
(
查看源代码
)
Template:Command-example
(
查看源代码
)
Template:Command-param
(
查看源代码
)
Template:GVI
(
查看源代码
)
Template:GVI/branch
(
查看源代码
)
Template:GVI/intro
(
查看源代码
)
Template:Name
(
查看源代码
)
该页面属于1个隐藏分类:
Category:Arma 2: New Scripting Commands List
Follow on IG
TikTok
Join Fan Lab