177 posts
Location
Murrika
Posted 20 April 2013 - 07:09 PM
So I am working on YouFindYourselfInARoom(a game on newgrounds) in CC, and I need to know how to detect certain text inputs written by the user such as "Look". Is this possible? If not, then I can believe I won't be able to make YFYIAR on CC :(/>
992 posts
Posted 20 April 2013 - 07:13 PM
local test = "bla"
local input = read()
if test == input then
print("same")
else
print("diffrent")
end
7508 posts
Location
Australia
Posted 20 April 2013 - 07:18 PM
string.find will solve your problems.
local input = string.lower(read())
if input:find('look') then
-- the input they have typed contains look
end
177 posts
Location
Murrika
Posted 20 April 2013 - 09:08 PM
Thanks guys. :)/>