It is not possible. Querst is trying to match ball.parent, which is an object called room, with a string, "room", and finds they are different. What you need to do is compare ball.parent.name = room... but the text processor will not allow that (strinckly one dot at most).
If you are doing a TA (may need to be off-line)...
Go to Filter (bottom left) and click Show Library Elements. In the grey functions, look for ProcessTextCommand_If, and select it. Click Copy (top right), then where is says Script in the middle area, click the seventh icon, Code View. Replace everything there with this:
command = Mid(section, 4)
colon = Instr(command, ":")
if (colon = 0) {
return ("{if " + command + "}")
}
else {
text = Mid(command, colon + 1)
condition = Left(command, colon - 1)
operator = Instr(condition, "<=")
if (operator <> 0) {
operatorlength = 2
}
if (operator = 0) {
operator = Instr(condition, ">=")
if (operator <> 0) {
operatorlength = 2
}
}
if (operator = 0) {
operator = Instr(condition, "<>")
if (operator <> 0) {
operatorlength = 2
}
}
if (operator = 0) {
operator = Instr(condition, "<")
if (operator <> 0) {
operatorlength = 1
}
}
if (operator = 0) {
operator = Instr(condition, ">")
if (operator <> 0) {
operatorlength = 1
}
}
if (operator = 0) {
operator = Instr(condition, "=")
if (operator <> 0) {
operatorlength = 1
}
}
if (operator = 0) {
checkfor = true
if (StartsWith(condition, "not ")) {
checkfor = false
condition = Mid(condition, 5)
}
dot = Instr(condition, ".")
if (dot = 0) {
result = GetBoolean(game, condition)
}
else {
objectname = Left(condition, dot - 1)
attributename = Mid(condition, dot + 1)
object = GetObject(objectname)
if (object = null) {
result = false
}
else {
result = GetBoolean(object, attributename)
}
}
if (result = checkfor) {
return (ProcessTextSection(text, data))
}
else {
return ("")
}
}
else {
lhs = Left(condition, operator - 1)
rhs = Mid(condition, operator + operatorlength)
op = Mid(condition, operator, operatorlength)
dot = Instr(lhs, ".")
if (dot = 0) {
objectname = ""
attributename = ""
if (HasInt(game, lhs)) {
objectname = "game"
attributename = lhs
}
else {
return ("{if " + command + "}")
}
}
else {
objectname = Left(lhs, dot - 1)
attributename = Mid(lhs, dot + 1)
}
object = GetObject(objectname)
if (object = null) {
return ("{if " + command + "}")
}
else {
value = GetAttribute(object, attributename)
// Next three lines added by The pixie
if (TypeOf(value) = "object") {
value = value.name
}
if (op = "=") {
if (ToString(value) = rhs) {
return (ProcessTextSection(text, data))
}
else {
return ("")
}
}
else if (op = "<>") {
if (not ToString(value) = rhs) {
return (ProcessTextSection(text, data))
}
else {
return ("")
}
}
else if (op = ">") {
if (ToDouble(ToString(value)) > ToDouble(rhs)) {
return (ProcessTextSection(text, data))
}
else {
return ("")
}
}
else if (op = "<") {
if (ToDouble(ToString(value)) < ToDouble(rhs)) {
return (ProcessTextSection(text, data))
}
else {
return ("")
}
}
else if (op = ">=") {
if (ToDouble(ToString(value)) >= ToDouble(rhs)) {
return (ProcessTextSection(text, data))
}
else {
return ("")
}
}
else if (op = "<=") {
if (ToDouble(ToString(value)) <= ToDouble(rhs)) {
return (ProcessTextSection(text, data))
}
else {
return ("")
}
}
}
}
}
The only difference is an extra four lines, the first being a comment, that will convert an object (such as ball.parent) to a string ("room").