![]() |
![]() ![]() ![]() ![]() ![]()
|
Author | Topic: Test for is character in the room |
Jim Trash |
![]() Hello, good evening, morning, afternoon, whatever. Bit of a beginners question here but I've got a character I want to follow the player around. I'm using 'afterturn' to point to a procedure that does movechar and prints a message. Unfortunately everything is a turn and so it prints the message at inapropriate moments. Can anyone tell me how I can test if the NPC is already in the room afore the rest of the procedure runs ? Kind regards Jim |
Luridii |
![]() Assuming Bob is the NPC if not is <$locationof(Bob)$; #quest.currentroom#> then do <movechar procedure> That will run the procedure to move the NPC into the room the player is currently in if the NPC is not currently in it |
Computer Whizz |
![]() Right.... first off you should change the NPC's to objects and upgrade to quest 3.0. Now. When you check if something is here (ie. present in the room!) then you say: quote: Any other help you need? Computer |
Computer Whizz |
![]() DAMN YOU LURIDII!!!! ![]() You had to post 2 minute's before me didn't you!?! My arch-nemisis strikes again!!! :) Computer |
Luridii |
![]() OMG Thats so funny! Mwa ha ha |
Computer Whizz |
![]() No need to get nasty!! ![]() When you posted your response to this fellow, why did you decide to use $locationof(blah)$ blah?? ......hhmmmmmm, guess it's just different opinions I guess. Computer |
Luridii |
![]() lol, umm i dunno! Oh well, they both work :) |
MaDbRiT |
![]() quote: Ah - well today I had to start work early, not wait until the streets are aired at 7.00 as I usually do ;-) ( Actually I was out taking photos- beautiful dawn here this morning ) Al |
Computer Whizz |
![]() Really? Where about's are you? Mid-lands, Up North, Norfolk Broads-way, C-something-or-rather (where the solar eclipse passed over!)? Oop's.... it's happening again! We're going off-topic Computer |
Jim Trash |
![]() Many thanks for the replies. I was kicking myself only moments after sending the message as I went back to read the ref. manual again and this time the HERE command fair leaped out and thwapped me around the head. ah well Thanks everyone |