If: Difference between revisions
(Marked this version for translation) |
No edit summary |
||
Line 6: | Line 6: | ||
<section begin=image/>[[File:If.png|alt=The if block|thumb]]<section end=image/> | <section begin=image/>[[File:If.png|alt=The if block|thumb]]<section end=image/> | ||
<section begin=name/>'''<code>if [_]</code>'''<section end=name/> is a [[code block]] part of the [[Logic]] drawer. | <section begin=name/>'''<code>if [_]</code>'''<section end=name/> is a [[code block]] part of the [[Logic]] drawer. | ||
</translate> | |||
<translate> | |||
<!--T:2--> | <!--T:2--> | ||
==Usage== | ==Usage== | ||
<p id="tooltip"><code>if [_]</code> takes in comparative statements from the [[Logic]] drawer to test for a condition. The [[agent]] will only follow commands attached to the hook if the statement is true.</p> | <p id="tooltip"><code>if [_]</code> takes in comparative statements from the [[Logic]] drawer to test for a condition. The [[agent]] will only follow commands attached to the hook if the statement is true.</p> | ||
</translate> | |||
<translate> | |||
<!--T:3--> | <!--T:3--> | ||
===Syntax=== | ===Syntax=== | ||
<code>if [Insert: Condition]</code> | <code>if [Insert: Condition]</code> | ||
</translate> | |||
<translate> | |||
==Nuances== <!--T:4--> | ==Nuances== <!--T:4--> | ||
</translate> | |||
<translate> | |||
<!--T:5--> | <!--T:5--> | ||
==Related Blocks== | ==Related Blocks== | ||
*<code>[[If Else|if [_] else]]</code> | *<code>[[If Else|if [_] else]]</code> | ||
</translate> | </translate> |
Revision as of 18:58, 28 June 2023
if [_]
is a code block part of the Logic drawer.
Usage
if [_]
takes in comparative statements from the Logic drawer to test for a condition. The agent will only follow commands attached to the hook if the statement is true.
Syntax
if [Insert: Condition]