My Parent: Difference between revisions
(Created page with "Category:Agents <section begin=image/>alt=take camera block|thumb<section end=image/> {{#vardefine:my parent|<code>my parent</code>}} <section begin=name/>'''<code>my parent</code>'''<section end=name/> is a code block part of the agents drawer. ==Usage== <code>my parent</code> refers to the agent that created the agent that is currently executing the code. ==Related Blocks== ==Relevant Video Resources== ==Relevant Activities...") |
(Marked this version for translation) |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> | |||
<translate> | |||
<!--T:1--> | |||
[[Category:Agents]] | [[Category:Agents]] | ||
<section begin=image/>[[File: | <section begin=image/> | ||
{{#vardefine:my parent|<code>my parent</code>}} | [[File:My Parent.png|alt=take camera block|thumb]] | ||
<section begin=name/>'''<code>my parent</code>'''<section end=name/> is a [[code block]] part of the [[agents]] drawer. | <section end=image/><p id="tooltip">Refers to the agent who created the agent that is calling the block.</p> | ||
==Usage== | |||
<!--T:8--> | |||
{{#vardefine:my parent|<code>my parent</code>}}<section begin=name/>'''<code>my parent</code>'''<section end=name/> is a [[code block]] part of the [[agents]] drawer. | |||
==Usage== <!--T:9--> | |||
<!--T:2--> | |||
<code>my parent</code> refers to the [[agent]] that created the agent that is currently executing the code. | |||
<!--T:3--> | |||
==Syntax== | |||
<code>parent</code> | |||
==Example== <!--T:10--> | |||
<!--T:11--> | |||
[[File:my_parent_example.gif|alt=My Parent example gif|thumb]] | |||
[[File:my_parent_example.png|alt=My Parent example code|thumb]] | |||
<!--T:12--> | |||
This is a model of follow the leader. Each time that the new duckling button is pressed, the newest ducking (shown in pink) creates a new duckling agent. We observe that the ducklings travel in a line since each agent follows its parent. | |||
< | <!--T:13--> | ||
<strong>Note:</strong> The original duckling of size two does not follow its parent (The World). If it did, it would simply continue to face toward center. | |||
==Related Blocks== | ==Related Blocks== <!--T:4--> | ||
==Relevant Video Resources== | ==Relevant Video Resources== <!--T:5--> | ||
<!--T:6--> | |||
==Relevant Activities== | ==Relevant Activities== | ||
[[Category:Code Block]] | [[Category:Code Block]] | ||
</translate> |
Latest revision as of 18:22, 11 August 2023
Refers to the agent who created the agent that is calling the block.
my parent
is a code block part of the agents drawer.
Usage
my parent
refers to the agent that created the agent that is currently executing the code.
Syntax
parent
Example
This is a model of follow the leader. Each time that the new duckling button is pressed, the newest ducking (shown in pink) creates a new duckling agent. We observe that the ducklings travel in a line since each agent follows its parent.
Note: The original duckling of size two does not follow its parent (The World). If it did, it would simply continue to face toward center.