Nearest Within Steps: Difference between revisions
(Created page with "Category:Detection Category:Code Block <section begin=image/><section end=image/> <section begin="name" />'''<code>nearest [▼] within [_] steps</code>'''<section end="name" /> is a code block part of the Detection drawer. == Usage== <p id="tooltip"><code>nearest [▼] within [_] steps</code> is used to refer to the nearest agent of a selected breed that exists within a given step limit in Spaceland.</p> ===Syntax=== <code>nearest [Dropdown: T...") |
(duplicate file already uploaded) |
||
(15 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> | |||
<translate> | |||
<!--T:1--> | |||
[[Category:Detection]] | [[Category:Detection]] | ||
[[Category:Code Block]] | [[Category:Code Block]] | ||
<section begin=image/><section end=image/> | <section begin=image/>[[File:Nearest within steps.png|alt=Nearest within steps|thumb]]<section end=image/><p id="tooltip">Returns the closest agent of a selected breed in a given radius.</p> | ||
<!--T:9--> | |||
<section begin="name" />'''<code>nearest [▼] within [_] steps</code>'''<section end="name" /> is a [[code block]] part of the [[Detection]] drawer. | <section begin="name" />'''<code>nearest [▼] within [_] steps</code>'''<section end="name" /> is a [[code block]] part of the [[Detection]] drawer. | ||
== Usage== | <!--T:2--> | ||
==Usage== | |||
<code>nearest [▼] within [_] steps</code> is used to refer to the nearest [[agent]] of a selected breed that exists within a given [[step]] limit in [[Spaceland]]. | |||
==Syntax== <!--T:3--> | |||
<!--T:4--> | |||
[[File:Nearest Within Steps.png|right|alt=The Create Each Do Block|thumb]] | |||
<!-- <code>nearest [Dropdown: Type of Agent](s) within [Textbox: Number] steps</code> --> | |||
Inputs in this block: | |||
#a breed from the dropdown menu | |||
#a number | |||
==Example== <!--T:10--> | |||
== | <!--T:11--> | ||
[[File:nearest_within_steps_example.gif|alt=Nearest Within Steps example gif|thumb]] | |||
[[File:face_towards_example.png|alt=Nearest Within Steps example code|thumb]] | |||
< | <!--T:12--> | ||
This is a model of a grazing herd of elephants. Because the elephants want to acquire the most food possible, they walk toward the grass that is closest to them within their sensing radius (30 steps). | |||
==Common Uses== | ==Common Uses== <!--T:5--> | ||
==Nuances== | ==Nuances== <!--T:6--> | ||
<!--T:7--> | |||
==Related Blocks== | ==Related Blocks== | ||
*<code>[[Nearest Within Steps With =|nearest [▼] within [_] with [▼] = [_]]]</code> | *<code>[[Nearest Within Steps With =|nearest [▼] within [_] steps with [▼] = [_]]]</code> | ||
</translate> |
Latest revision as of 15:33, 16 August 2023
Returns the closest agent of a selected breed in a given radius.
nearest [▼] within [_] steps
is a code block part of the Detection drawer.
Usage
nearest [▼] within [_] steps
is used to refer to the nearest agent of a selected breed that exists within a given step limit in Spaceland.
Syntax
Inputs in this block:
- a breed from the dropdown menu
- a number
Example
This is a model of a grazing herd of elephants. Because the elephants want to acquire the most food possible, they walk toward the grass that is closest to them within their sensing radius (30 steps).