Aller au contenu

Photo

NPC Gives PC Item During Convo


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

#1
Souldry

Souldry
  • Members
  • 8 messages
Hey, can anyone help me out with a script that enables the npc to give the pc a item during the convo? Thank you

#2
Bazilbrush

Bazilbrush
  • Members
  • 28 messages
What is the resref of the item you wish to give?

#3
Snarkblat

Snarkblat
  • Members
  • 52 messages
There's a fairly simple way to give/take away items using the NW script wizard in the toolset... you can find it under the "actions taken" section in the conversation node.

If memory serves, it should look something like this:

//Put this on action taken in the conversation editor
void main()
{

object oPC = GetPCSpeaker();

CreateItemOnObject("blueprint_of_item_goes_here", oPC);

}

Modifié par Snarkblat, 03 juillet 2011 - 09:36 .


#4
Souldry

Souldry
  • Members
  • 8 messages
does the npc have to have the item in his inventory?

#5
Bazilbrush

Bazilbrush
  • Members
  • 28 messages
No he doesn't, it is automatically put into the player's inventory.

#6
Souldry

Souldry
  • Members
  • 8 messages
I copied and pasted the script into actions taken and its not working

#7
Snarkblat

Snarkblat
  • Members
  • 52 messages
Oh, my bad. It should be the blueprint of the item, not the tag. It's case sensitive too. Make sure the blueprint in the script matches the one in your palatte.

#8
Bazilbrush

Bazilbrush
  • Members
  • 28 messages
Try this one, you need to put the resref of your item in between the quotes.


void main()
{

object oPC = GetPCSpeaker();

CreateItemOnObject("resref of item", oPC);

}

#9
Souldry

Souldry
  • Members
  • 8 messages
lol my bad you guys are right haha thanks a lot guys