Difference between revisions of "Advanced Said() Strings - Part 3 - Prepositions"
From SCI Wiki
Jump to navigationJump to search(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
Example of the preposition 'in', which is classified in the vocab as a preposition (in the template game): | Example of the preposition 'in', which is classified in the vocab as a preposition (in the template game): | ||
<div class="CodeBlockHeader">Code:</div> | <div class="CodeBlockHeader">Code:</div> | ||
− | <syntaxhighlight lang="sci | + | <syntaxhighlight lang="sci"> // Responds to user input of: 'put key in lock' |
(if(Said('put<in/key/lock')) | (if(Said('put<in/key/lock')) | ||
Print("You put the key in the lock") | Print("You put the key in the lock") | ||
Line 13: | Line 13: | ||
<div class="CodeBlockHeader">Code:</div> | <div class="CodeBlockHeader">Code:</div> | ||
− | <syntaxhighlight lang="sci | + | <syntaxhighlight lang="sci"> // Responds to user input of: 'open door with key' |
(if(Said('open/door/key<with')) | (if(Said('open/door/key<with')) | ||
Print("You open the door with the key") | Print("You open the door with the key") |
Latest revision as of 12:45, 11 August 2013
By Gumby
Prepositions (and Unclassified words)
Example of the preposition 'in', which is classified in the vocab as a preposition (in the template game):
Code:
// Responds to user input of: 'put key in lock'
(if(Said('put<in/key/lock'))
Print("You put the key in the lock")
)
Example of the preposition 'with', but has an unclassified word class in the template game:
Code:
// Responds to user input of: 'open door with key'
(if(Said('open/door/key<with'))
Print("You open the door with the key")
)
Don't despair with this discrepancy. By setting 'with' to a preposition it will behave just like the 'in' preposition example.