how do you check for alias in player inventory

Post » Tue Jan 21, 2014 5:15 pm

I need to check if a specific aliasref is inside a players inventory. I can't check the item itself because the alias chooses randomly.

In the dialogue conditions box, I don't see anything referring to GetItemAlias etc. So wondering how to go about doing that.

Just a setup so you know what I'm looking for.

I have 7 aliasref that get filled with 7 items, but their randomized, so item 1 may not exactly go with alias 1, it could be item 7 with alias 6 etc.

I also have 7 AliasRef that get filled with random People (I have no idea on the people, it's set to fill in certain criteria)

but in a dialogue I have to give people certain packages, (again, it's not so much item 1 as it is, alias 1 goes to alias person 1.

So i need to (hand over a package) to alias1 with aliasItem1. SO i need to condition the dialogue so If that person is alias1 AND I have AliasItem1 in my inventory,

THEN the dialogue to (Hand over package) shows up.

As it is now, it's only conditioned to check if that person is an aliasref. So even if i don't have the item in my inventory it still shows up, which of course I don't want.

I could really use some help on this please.

Thanks for the help all, appreciate it.

User avatar
Solina971
 
Posts: 3421
Joined: Thu Mar 29, 2007 6:40 am

Post » Tue Jan 21, 2014 6:31 pm

  • Quest
    ScriptName YourQuestScript Extends Quest ConditionalBool Property bPlayerHasReferenceAliasInInventory Auto Conditional
  • ReferenceAlias
    ScriptName YourAliasScript Extends ReferenceAliasActor Property PlayerREF AutoYourQuestScript Property QuestScript AutoEvent OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)    QuestScript.bPlayerHasReferenceAliasInInventory = akNewContainer && akNewContainer == PlayerREFEndEvent
From there, in the dialogue, you can use http://www.creationkit.com/GetVMQuestVariable to check QuestScript.bPlayerHasReferenceAliasInInventory.
User avatar
Nicola
 
Posts: 3365
Joined: Wed Jul 19, 2006 7:57 am

Post » Tue Jan 21, 2014 1:51 pm

Ah okay, so if i understand this. What's posted will work with one reference. so if I wanted 7, then i would add more bool properties with say, bPlayerHasReferenceAliasInInventoryA, bPlayerHasReferenceAliasInInventoryB, bPlayerHasReferenceAliasInInventoryC. etc.

Then with each alias ref, add that script and change the bPlayerHasReferenceAliasInInventoryA,b,c etc.. accordingly.

so each alias picked up, will match that specific bool function.

User avatar
Sun of Sammy
 
Posts: 3442
Joined: Mon Oct 22, 2007 3:38 pm

Post » Tue Jan 21, 2014 9:05 am

Yup. As I recall, array properties can't be made *conditional, unfortunately. Maybe FO4.

*might have just been that the condition doesn't let you choose an element
User avatar
Flesh Tunnel
 
Posts: 3409
Joined: Mon Sep 18, 2006 7:43 pm

Post » Tue Jan 21, 2014 7:06 am

Appreciate this, thanks.

User avatar
Taylor Tifany
 
Posts: 3555
Joined: Sun Jun 25, 2006 7:22 am

Post » Tue Jan 21, 2014 5:29 am

Glad to have helped and good luck with your endeavor :smile:
User avatar
Avril Churchill
 
Posts: 3455
Joined: Wed Aug 09, 2006 10:00 am


Return to V - Skyrim