You are here

HELP! 2: Dialog: gc_equipped - not working? And not own script either...

5 posts / 0 new
Last post
fkirenicus
HELP! 2: Dialog: gc_equipped - not working? And not own script either...

I have a dialog. 
In that dialog, there's a check to see if the PC is wearing a Dustman robe. If (s)he does, the NPC should comment something about that, rather than going for the normal response at first. 

I first tried using the gc_equipped for that, but that doesn't seem to work. So, I tried Lilac Soul's Script Generator (sorry, I admit that I never got used to the syntax of conditional scripts, so I must resort to cheating), but the script I got from that doesn't work either. 
The tag/resref of the item is fk_a_dustman.
I want to check that if the PC is wearing the Dustman robe (which means it is equpped in the Chest slot, I presume?), the NPC rather comments on that (higher in the dialog structure) than giving the normal response (which has no check). 

Am at work now or I would have posted the script I got from the Script Gen. Will post it later today, unless someone already knows the answer. 
gc_equipped seems to me not to take into account that the item actually must be *equipped*, it only checks if the item in question exists in the inventory...?

- fkirenicus -

  • up
    50%
  • down
    50%
kamal

Hit the refresh button next to the script/parameters in the dialog, because gc_equipped definitely works.

  • up
    100%
  • down
    0%
fkirenicus

Oooook.. I'll test it again when I get home. then. 

  • up
    50%
  • down
    50%
fkirenicus

First, here's the new script by ScriptGen:

#include "ginc_misc"
 
int StartingConditional()
{
object oPC = GetPCSpeaker();
 
if (GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC))!="fk_a_dustman") return FALSE;
 
return TRUE;
}
  • up
    50%
  • down
    50%
fkirenicus

Second, I have tested gc_equipped again, and it DOES work. I won't get into detail why I couldn't get it to work before, but I had most categorically NOT changed the item tag after creating it; that has nothing to do with it whatsoever... ;-)

  • up
    50%
  • down
    50%