Aller au contenu

Photo

Equipping gear not rendering on Companion


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
IxionReborn

IxionReborn
  • Members
  • 84 messages
Earlier this wasn't a problem but as I continued on, During a conversation I have a companion equip 2 items, a helmet and a cloak. Both of which are custom content created by me.  However the NPC doesnt appear to have the equipment on in game (It isn't rendering/ isn't showing). I go to check the companions inventory by selecting him and it instantly appears on him, (after the conversation finished). I need them to be visible in the convo due to them being a important plot device.

I'm not sure if there is a bug listed towards equiping items in a conversation but this is the script I used and it works (technically) but doesnt show the equipped gear in the conversation.

[ga_giveitem script modified to be able to give to NPCs in a conversation]
[Then I just use the standard ga_equipitem script in the convo]

#include "ginc_param_const"
#include "ginc_debug"
void main(string sTarget, string sTemplate)
{
    object oPC = GetPCSpeaker();
    string sTargetDefault;
    string sDelim;
    if (oPC == OBJECT_INVALID)
    {   // script is not being run from a conversation with a PC speaker so assume it is from a console command.
        sTargetDefault = "$OBJECT_SELF";
        sDelim = " ";   // runscripts can't use commas inside strings...
    }
    else
    {
        sTargetDefault = "$PC";
        sDelim = ",";
    }
    object oTarget = GetTarget(sTarget, sTargetDefault);
    CreateItemOnObject(sTemplate, oTarget);
}

Modifié par IxionReborn, 19 mai 2011 - 03:38 .


#2
MasterChanger

MasterChanger
  • Members
  • 686 messages
CreateItemOnObject doesn't forceit to be equipped, it just adds it to inventory. You need to assign ActionEquipItem to the companion as well.

You can use the nice CSLEquipNewItem function to do both if you like.

#3
IxionReborn

IxionReborn
  • Members
  • 84 messages
I know, in my previous post I said I also use the standard, ga_equipitem script in the conversation. The NPC is actually getting the items, its just some visual error that I can't figure out.

I put the equip scripts in a different node but it still does the same thing, I'm not sure if theres a delay function script or i have to make my own custom one, I guess I'll try making a custom one for now, though it isn't as modular.


update:  It still didn't work, I put in a custom script and added a delays to both equips but they didnt appear in the convo.

Modifié par IxionReborn, 19 mai 2011 - 05:54 .