Add package using script?

Post » Sat Nov 17, 2012 11:39 pm

Is it possible to add a package to a actor using Papyrus in the dialogue section (the topic info tab where there is the "Begin" script box and "End" script box? I'm currently making a quest that when a player speaks to a guard he will give radiant quest to the player and also follow the player, currently I'm unsure about what does this. (Please note I'm not a good programmer, probably the worst but I am an expert with GTA San Andreas coding though. :biggrin: Thank in advance.
User avatar
REVLUTIN
 
Posts: 3498
Joined: Tue Dec 26, 2006 8:44 pm

Post » Sun Nov 18, 2012 1:48 am

The only way to add a package dynamically is to put the actor in an alias that has the package. You can do this in a script using ForceRefTo, but it may be better just to start a quest with the desired alias.
User avatar
Nymph
 
Posts: 3487
Joined: Thu Sep 21, 2006 1:17 pm

Post » Sun Nov 18, 2012 12:38 am

The only way to add a package dynamically is to put the actor in an alias that has the package. You can do this in a script using ForceRefTo, but it may be better just to start a quest with the desired alias.
The Bethesda carriage system used ForceRefTo and I kept it as it seemed to work fine. Are there problems with the ForeceRefTo? (I know Beth doesn't always do the best things...) In my case, it really isn't possible to start the quest with the desired alias already filled as the quest starts the game enabled and the player can change followers. I haven't had any known problems, but maybe I didn't know what to look for?

Edit:
And btw, I think Ingenue solution is really the way to accomlish your goal Pie015.
User avatar
Guy Pearce
 
Posts: 3499
Joined: Sun May 20, 2007 3:08 pm

Post » Sun Nov 18, 2012 10:32 am

The only problem with ForceRefTo that I know of is that it may make references persistent. But the big advantage of using a quest instead comes if you want to use Find matching reference to fill an alias, which is a lot more useful at finding nearby NPCs than the Papyrus 'Find' functions are.
User avatar
Rachel Cafferty
 
Posts: 3442
Joined: Thu Jun 22, 2006 1:48 am

Post » Sun Nov 18, 2012 8:15 am

The only problem with ForceRefTo that I know of is that it may make references persistent. But the big advantage of using a quest instead comes if you want to use Find matching reference to fill an alias, which is a lot more useful at finding nearby NPCs than the Papyrus 'Find' functions are.
Agreed! I use the alias conditions to find the current followers.

But new people need to keep in mind, Alias are filled when the quest start - so in my case, I restart the quest when I need to get the current followers. (Otherwise, and I will probably change to this in my next release, I would use a seperate quest that I stop/start when I need to get the current followers.)
User avatar
stephanie eastwood
 
Posts: 3526
Joined: Thu Jun 08, 2006 1:25 pm

Post » Sun Nov 18, 2012 3:28 am

I made the alias and named it "Guard" (nice I know :cool: ) which i added the "FollowPlayer" package and then I went to the dialogue section and opened the topic info text (where the "Begin" and "End" section is) and put this "Function ForceRefTo(ObjectReference Guard) native" into the End script box and hit compile but it doesn't work, it just failed.
User avatar
laila hassan
 
Posts: 3476
Joined: Mon Oct 09, 2006 2:53 pm


Return to V - Skyrim