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
0
3 replies to this topic
#1
Posted 20 April 2013 - 06:09 PM
#2
Posted 20 April 2013 - 06:13 PM
local test = "bla"
local input = read()
if test == input then
print("same")
else
print("diffrent")
end
local input = read()
if test == input then
print("same")
else
print("diffrent")
end
#3
Posted 20 April 2013 - 06: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
#4
Posted 20 April 2013 - 08:08 PM
Thanks guys.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users