Hey, can anyone help me out with a script that enables the npc to give the pc a item during the convo? Thank you
NPC Gives PC Item During Convo
Débuté par
Souldry
, juil. 03 2011 05:22
#1
Posté 03 juillet 2011 - 05:22
#2
Posté 03 juillet 2011 - 06:50
What is the resref of the item you wish to give?
#3
Posté 03 juillet 2011 - 07:04
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);
}
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
Posté 03 juillet 2011 - 09:13
does the npc have to have the item in his inventory?
#5
Posté 03 juillet 2011 - 09:17
No he doesn't, it is automatically put into the player's inventory.
#6
Posté 03 juillet 2011 - 09:34
I copied and pasted the script into actions taken and its not working
#7
Posté 03 juillet 2011 - 09:35
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
Posté 03 juillet 2011 - 09:37
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);
}
void main()
{
object oPC = GetPCSpeaker();
CreateItemOnObject("resref of item", oPC);
}
#9
Posté 04 juillet 2011 - 12:53
lol my bad you guys are right haha thanks a lot guys





Retour en haut






