NPC's using portcullis

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

NPC's using portcullis

Post 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
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

Re: NPC's using portcullis

Post 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.
Locked