Difference between revisions of "User:Ichinin"
Jump to navigation
Jump to search
"Bye-bye PlaceAtMe and MoveTo, Hello Questscripts"
imported>Ichinin |
imported>Ichinin ("Bye-bye PlaceAtMe and MoveTo, Hello Questscripts") |
||
Line 1: | Line 1: | ||
2007 Feb 17: FIRST POST!!! | |||
Ok, to start off this page (whatever its for) how about putting something useful here? | |||
So, why not throw some light on Companion NPCs? | |||
Yeah, i'll do that for starters. | |||
First, i wanted to get rid of alot of scripting. The dialogue system is perfect for reducing scripting on the NPCs. | |||
First, i created two AIpackages: | |||
'''MyFollowPlayerPackage''' (Follow Player, indefinitly) | |||
'''MyStandStillPackage''' (Return to Editor Location, indefinitly) | |||
I Created 2 NPCs, draged them out into some cell and gave them one refence name each, NPC1Ref and NPC2Ref. (What a creative mind i got...) | |||
Then i created a dummyquest with two topics "-Follow" and "-Stay". Then i went in on the "scripting" part of it and used | |||
"AddScriptPackage MyFollowPlayerPackage" | |||
"AddScriptPackage MyStandStillPackage" | |||
Under each topic, and did two of them and set a condition using "GetIsReference" with NPC1Ref and NPC2Ref respectively so you could assign these Packages to each NPC without the other getting the same one. | |||
Then i did a simple questscript that did Addtopic for the two topics i mentioned earlier (by using their ID). | |||
Voila.. i now have dialogue options for making a simple NPC follow or stay. | |||
Neat eh? | |||
But there is more. What about '''Companion Share'''? | |||
If you are somewhat into the TES-CS you immediately say "PlaceAtMe" - or "MoveTo" if you are a bit smarter :D | |||
Well.. i had other plans. I did what i did earlier. | |||
I create a dummy cell, like others had done. I made sure i had a barrel with zero items and no respawn set and put a barrel into the dummy cell. | |||
Then i made 4 NPCs and gave them references (as usual) Now, the nice part is that i figured that while the Quest script was doing its dialogue thing, it could also do the companion share thing so no NPC would have to have much or ANY scripting. | |||
I create a variable in the quest script and set the ID number of the NPC i had selected the "-Companion Share" topic for. Then the quest script would pick that up, set a reference variable to the choosen NPC and do the removeallitems... (forward and back). | |||
i also did a dummy item that i used Additem, Equip, Removeitem to make them "dress up" again, but i realised that you could to | |||
NPC.Disable | |||
NPC.Enable | |||
And they would "dress up" again too. However, the NPC would change its position so i thought it would be better to just use a dummy item. | |||
Anyway, that was my first entry on this site. I hope someone will read it and find it useful. |