Face Towards: Difference between revisions

From StarLogo Nova Wiki
(updates from Blockument)
(duplicate file already uploaded)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
<translate>
<translate>


<!--T:3-->
<section begin="image"/>[[File:face_towards.png|alt=The Face Towards Block|thumb]]<section end="image"/>
<section begin="image"/>[[File:face_towards.png|alt=The Face Towards Block|thumb]]<section end="image"/>


==Usage==
==Usage== <!--T:4-->


<!--T:2-->
<!--T:2-->
<p id="tooltip">Turns to face the agent specified.</p>
<p id="tooltip">Turns to face the agent specified.</p>


==Syntax==
==Syntax== <!--T:5-->


<!--T:6-->
Inputs in this block:
Inputs in this block:
#a block which specifies another agent in The World
#a block which specifies another agent in The World


==Example==
==Example== <!--T:7-->


[[File:face_towards_example.gif|alt=Face Towards example gif|thumb]]
<!--T:8-->
[[File:nearest_within_steps_example.gif|alt=Face Towards example gif|thumb]]
[[File:face_towards_example.png|alt=Face Towards example code|thumb]]
[[File:face_towards_example.png|alt=Face Towards example code|thumb]]


<!--T:9-->
The elephants face toward the nearest patch of grass within their sensing radius and walk towards it. This behavior is enabled by the [[Special:MyLanguage/Nearest Within Steps|nearest]] block, which identifies the closest agent of a specified breed. This may model a hungry elephant more accurately than a basic wiggle walk since elephants likely walk towards food.
The elephants face toward the nearest patch of grass within their sensing radius and walk towards it. This behavior is enabled by the [[Special:MyLanguage/Nearest Within Steps|nearest]] block, which identifies the closest agent of a specified breed. This may model a hungry elephant more accurately than a basic wiggle walk since elephants likely walk towards food.



Latest revision as of 18:30, 16 August 2023

Other languages:
The Face Towards Block

Usage

Turns to face the agent specified.

Syntax

Inputs in this block:

  1. a block which specifies another agent in The World

Example

Face Towards example gif
Face Towards example code

The elephants face toward the nearest patch of grass within their sensing radius and walk towards it. This behavior is enabled by the nearest block, which identifies the closest agent of a specified breed. This may model a hungry elephant more accurately than a basic wiggle walk since elephants likely walk towards food.