Creation an Alias halfway through a quest?

Post » Mon Nov 19, 2012 8:08 am

In a quest stage use

Game.GetPlayer().AddItem(Alias_YourAliasName.GetReference(), 1)

:) should also work in dialogue etc. if not, use

Game.GetPlayer().AddItem(YourReferencePropertyHere.GetReference(), 1)
User avatar
Marta Wolko
 
Posts: 3383
Joined: Mon Aug 28, 2006 6:51 am

Post » Mon Nov 19, 2012 5:26 am

The latter of those two compiled nicely in my dialogue fragment. Yaaay! I haven't actually tested to see if it works, but I assume it will. I'll make more noise if it doesn't. :P

Thanks for all the help, everyone! :D
User avatar
TOYA toys
 
Posts: 3455
Joined: Sat Jan 13, 2007 4:22 am

Post » Mon Nov 19, 2012 8:24 am

No probs :) you should however get into the habit of creating a player property. It's much faster than Game.GetPlayer()

In the property window, select actor, then in Cell choose Any, and select the Player. I call my property Player. Some people call it PlayerRef.

Food for thought :)
User avatar
Pixie
 
Posts: 3430
Joined: Sat Oct 07, 2006 4:50 am

Post » Mon Nov 19, 2012 8:55 am

Ah yes, people have mentioned that before. I really need to start doing it since it really isn't much extra work. (It's what, like 6 seconds to add the property? :P)
User avatar
Juliet
 
Posts: 3440
Joined: Fri Jun 23, 2006 12:49 pm

Post » Mon Nov 19, 2012 5:49 am

Ah yes, people have mentioned that before. I really need to start doing it since it really isn't much extra work. (It's what, like 6 seconds to add the property? :P)

Yea mate :P
User avatar
sally R
 
Posts: 3503
Joined: Mon Sep 25, 2006 10:34 pm

Post » Mon Nov 19, 2012 4:12 am

Player.AddItem(MyAlias)
PlayerREF.AddItem(MyAlias.GetReference())
Won't work w/o http://www.creationkit.com/GetReference_-_ReferenceAlias.
User avatar
Danger Mouse
 
Posts: 3393
Joined: Sat Oct 07, 2006 9:55 am

Post » Mon Nov 19, 2012 5:26 am

Going all the way back to the Form level is unnecessary for AddItem. The function permits References to be used, as well (Beth's own setup of the function is a bit misleading in that regard). So just do an AddItem (MyObjectAlias.GetReference()) and it will move the Refernce that is currently filling the Alias into the Player's inventory.
Oh cool, I didn't know that. Thanks for pointing it out to me :)

Cipscis
User avatar
Jade Barnes-Mackey
 
Posts: 3418
Joined: Thu Jul 13, 2006 7:29 am

Previous

Return to V - Skyrim