Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Simple NPC to PC scripting question

Page: 1 of 1
 MasterWaffle
02-20-2008, 3:33 AM
#1
Hey, just a question. I did look at the tutorials and didn't find anything, so if someone could point me in the right direction that would be realy helpful.

How do you make an NPC give an item to the PC at the end of a conversation?

I'm sure I just need a script to run after the NPC says something, but I can't find anything.
 DarthJebus05
02-20-2008, 4:05 AM
#2
object oItem=CreateItemOnObject( "item_template", GetFirstPC());

Atatch it to the last line of the conversation.
 MasterWaffle
02-20-2008, 4:06 AM
#3
object oItem=CreateItemOnObject( "item_template", GetFirstPC());

Atatch it to the last line of the conversation.

Thank you Jebus!
 DarthJebus05
02-20-2008, 4:55 AM
#4
Thank you Jebus!

You're welcome MasterWaffle!
 Robespierre
02-20-2008, 6:17 AM
#5
Thank you Jebus!

Reminds me of a Simpsons quote.

Perhaps someone should make a big sticky with all of this information? I mean, its all here but finding it could be made much easier with a sticky in the scripting section. I don't mean just in this thread but all of the scripting question threads, since there's a ton of commands listed there that I don't think are listed anywhere else...If I'm wrong please correct me.
 DarthJebus05
02-20-2008, 6:27 AM
#6
 Robespierre
02-20-2008, 6:27 AM
#7
Ah. Looks like tk102 already beat me to it.

Nice idea of mine, well done me.
 MasterWaffle
02-20-2008, 8:15 PM
#8
I got that script from here: http://www.lucasforums.com/showthread.php?t=143412)

See, I must really need a new glasses prescription because I looked through that thread. *facepalm*
Page: 1 of 1