I know that I'm pointing to a very complicated trigger, since I wrote it myself to be very complicated:
Parna's Elevator
This isn't quite the same thing but if you look for the variables targfl and CurFl (current floor), you can see the response changing as the trigger compares the floor you want to get to against the floor you're on now.
Example:
Code:
if %targfl% == g
set dir down
eval length %Curfl%
elseif %targfl% > %Curfl%
set dir up
eval length %targfl% - %Curfl%
elseif %targfl% < %Curfl%
set dir down
eval length %Curfl% - %targfl%
else
set dir nowhere
set length 0
end
If you use the elevator on the test port, it might be easier to understand but you can see that I'm using a variable named CurFl and changing it as my virtual elevator moves up or down. The trigger then takes that number and uses it to change the response.
You'll see it again here:
Code:
if %Curfl% == 0
set displaymsg the ground floor
else
set displaymsg floor %Curfl%
end
%send% %actor% The elevator is on %displaymsg%.
halt
* if look is not noarg or display
else
return 0
end
This one is actually much simpler because it basically says, if you look at the elevator display (which is something most people do most days in real life) it will tell you which floor the elevator is on. If you look at it a few seconds later, you'll see if the elevator is standing still, moving up or moving down, just by checking changes in the variable.
I hope this helps you.