Quote from: Crimson Wizard on Fri 19/04/2013 12:35:38
Hmm, probably this:Code: ags GUIControl *ctrl = GUIControl.GetAtScreenXY(mouse.x, mouse.y); if (ctrl == gInvWindow /* use your actual inventory gui script name here */) { // do something }
Sorry for the late reply. I've been trying to implement dialogues and finishing off a few other rooms. The submission for a prototype is in a few hours so I'm pretty swamped. Anyways, when I try to use this code it gives me an error and says that it
cannot convert 'GUIControl*' to 'GUI*'
I've pasted it in the repeatedly_execute function.
EDIT:
Okay, i changed it to GUI from GUIControl and it started working. But, there's a new problem now. When you end up selecting at item from the inventory window, it's supposed to switch to the cursor mode for that item.
However, since the mouse is on the inventory when you select it, the code executes and turns it into eModeInteract again.
EDIT 2:
Okay, never mind. Turns out, all I needed to do was add a code which checks if the character's current active inventory is null or not with a simple If statement and then execute the code accordingly.
No more errors.

