Take Camera: Difference between revisions

From StarLogo Nova Wiki
No edit summary
(Marked this version for translation)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<translate>
<!--T:1-->
[[Category:Agents]]
[[Category:Agents]]
<section begin=image/>[[File:Create Block.png|alt=The create block|thumb]]<section end=image/>
<section begin=image/>[[File:Take Camera.png|alt=take camera block|thumb]]<section end=image/><p id="tooltip">Enables perspective of over-agent’s-shoulder view; i.e., the camera follows the agent around.</p>
{{#vardefine:create|<code>create [_] [▼](s)</code>}}
 
<section begin=name/>'''<code>create [_] [▼](s)</code>'''<section end=name/> is a [[code block]] part of the [[agents]] drawer.
<!--T:9-->
==Usage==
{{#vardefine:take camera|<code>take camera</code>}}<section begin=name/>'''<code>take camera</code>'''<section end=name/> is a [[code block]] part of the [[agents]] drawer.
 
==Usage== <!--T:8-->


<code>create [_] [▼](s)</code> is used to populate [[Spaceland]] with [[agent]]s.
<!--T:2-->
<code>take camera</code> changes the camera perspective to be from the point of view of the agent executing the code.


===Syntax===
<!--T:3-->
{{#var:take camera}} can be useful for implementing interactive games from the first-person perspective.


<code> create [Textbox: Number] [Dropdown: Type of Agent](s) </code>
<!--T:4-->
==Syntax==
<code>(in reference to the agent itself) take camera</code>


==Nuances==
==Example== <!--T:10-->


An important difference between {{#var:create}} and {{#vardefineecho:cedol|<code>[[Create Each Do|create [_] [▼](s) each do</code>]]}} is that {{#vardefineecho:cedo|<code>create [_] [▼](s) each do</code>}} allows a section of code to run individually for each [[agent]] that is created. {{#var:create}} only creates agents with the default [[trait]]s in the center of [[Spaceland]].
<!--T:11-->
[[File:take_camera_example.gif|alt=Take Camera example gif|thumb]]
[[File:take_camera_example.png|alt=Take Camera example code|thumb]]


{{#var:cedol}} can be useful for [[randomizing traits]] and [[scattering agents without effecting others]].
<!--T:12-->
When the ‘change view’ button is pushed, the camera angle to over the shoulder of the elephant agent. Note that if there were multiple elephants, a single elephant would take the camera.


==Related Blocks==
==Related Blocks== <!--T:5-->
*{{#var:cedol}}


==Relevant Video Resources==
==Relevant Video Resources== <!--T:6-->


<!--T:7-->
==Relevant Activities==
==Relevant Activities==
[[Category:Code Block]]
[[Category:Code Block]]
</translate>

Latest revision as of 18:18, 11 August 2023

Other languages:
take camera block

Enables perspective of over-agent’s-shoulder view; i.e., the camera follows the agent around.

take camera is a code block part of the agents drawer.

Usage

take camera changes the camera perspective to be from the point of view of the agent executing the code.

take camera can be useful for implementing interactive games from the first-person perspective.

Syntax

(in reference to the agent itself) take camera

Example

Take Camera example gif
Take Camera example code

When the ‘change view’ button is pushed, the camera angle to over the shoulder of the elephant agent. Note that if there were multiple elephants, a single elephant would take the camera.

Related Blocks

Relevant Video Resources

Relevant Activities