Page 1 of 1

NPC's using portcullis

Posted: Sun Dec 30, 2007 7:31 pm
by Donfrow
Ok, I've finally come up with another question :P The existing portcullis threads seem to deal with BG and the avatar using the portcullis, so it isn't of much help.

Anyway, I'm trying to make a NPC which can open a portcullis for the avatar when asked to (like the guards in Monitor). However, I'm unsure of how to make the NPC "doubleclick" on the winch.

I'm assuming that in the NPC's usecode I would use UI_find_nearest to actually find the portcullis winch and get the object reference for it, and from here I can find it's loc using UI_get_object_position to cause the NPC to path over to it.

However, once there, how do I actually tell the game to act as if it's double clicked?

Thanks

Re: NPC's using portcullis

Posted: Sun Dec 30, 2007 7:32 pm
by Donfrow
Forgot to add, this is SI so no need to worry about the flag (57 was it?) and the avatar is able to use it when double clicked on, so I know they do work.