Car door vs. house door

Jim C Hi, I just started on my own game using SCI Studio 3 a few days ago. I've put a lot of hours into it, and I figured out a lot of my problems on my own, but there's a couple of issues I can't figure out:

1) I can't get the game to distinguish between a car door and a house door. I read the "said handling" section of the tutorial, but nothing I try works. What I want is to be able to say "open house door" and "open car door" and have it know the difference. Just saying "open door" should result in a "be more specific" reply.

2) I want to trigger an event after a prop animation is complete. I have something like:
(send gRoom:newRoom(3))
but the new room opens before the animation starts. How can I tell it to wait for the end?

Thanks very much for any help you can give me. Brian, this is a great program. I'm having so much fun!
doan sephim hey jim,
well, im just a beginner too and there might be a better way to do this, but here is what i would do:
i would put in a said command like
= button Print("which one would you like to open?"
#title "Which?"
#button "The car door" 1
#button "The house door" 0
and set up the two buttons with their appropriate endings.
as for your other question, i dont know but i bet that it has something to do with which of the two the computer can do faster...but again, i leave that to someone smarter than me, but dont worry cuz there are plenty of them out there ;)
Jim C Thanks for the tip, doan! I'd prefer to stick with regular text input in this instance, but I think I will use that button trick in another part of my game.
cloudee1 The easiest and less confusing for the player would be to set up two different control colors (red, lime lets say)
make these two colors around the area where you want either of the doors. then

(if(== (send gEgo:onControl()) ctlRED)(carDoor:open())
(else(if(== (send gEgo:onControl()) ctlLIME)(houseDoor:open())
(else Print("Stand closer to the door you want to open!"))

I just punched this code in, it might not be 100% but it's pretty close.

it's easier than wrestling with the syntax (trust me!)
Eigen For the triggering the and event

First add another instance:

(instance GoToRoom of Script
(method(changeState newState)
= newState 0
= state newState
(case 0
(send gRoom: newRoom(3))

and then use

(animation:setCycle(End GoToRoom))

Jim C Great, thanks guys! I guess that answers both of my questions. I hadn't figured out how to use states yet, but that code helps a lot. Thanks again.
Brian_Provinciano Hi! Nice to see you enjoying SCI Studio. Picture controls are the easiest and most efficient way to do things. When drawing your picture in the picture editor, switch to the control screen and car draw a region around the door in one colour, and around the other door in another colour. Then simply check them in the script like cloudee mentioned.

The tutorial show how to do this in detail as well. Good luck!