ScriptQuest Help

Post » Sat Dec 15, 2012 6:50 am

Hey guys.

I've recently picked up the CK and decided I wanted to try out some mods and I've done a bit of simple things but after 50 hours :blink: in the CK I haven't really had anything to show for it so I've decided to try actually making something which isn't a duplicate of some tutorial or standard quest.

I've decided to try making a follower with a few unique quests and so on.

What I've been having trouble with the entire day is getting a quest to update when the player aquires or has the Dawnbreaker in his/her inventory and the follower is aquired. and if he isn't aquired just set the quest on standby untill he is aquired.

I've tried several different scripts, like OnContainerChanged, Game.GetPlayer().GetItemCount, OnItemAdded and some more unconventional things like a variable, but it has never worked and I've checked my scripts and tried different ones a million times and 1 thing they all had in comment was they never worked, so I started thinking that it may that they never register that I pick up or have the Dawnbreaker.
So, I tried placing the script on the clean dawnbreaker instead of the ReferenceAlias and it never triggered. Am I doing something completely wrong or is it impossible to make the dawnbreaker triggger a script?
I can't even make a force reference since the dawnbreaker is actually never placed in the game. It is given to the player via a Player.additem command in the Quest.

Here is the latest script I've tried to set on PlayerRef, which is stolen from the BYOHBuilding Quest and it still doesn't trigger.
Spoiler
Scriptname AaVampHunterDawnBreaker01OnItemAdded extends ReferenceAlias  Quest Property AaVampHunterDawnBreaker01Quest AutoQuest Property AaVampHunterDialogueFollower AutoWeapon Property Dawnbreaker AutoEvent OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)	debug.Notification(self + "OnItemAdded " + akBaseItem + ", itemCount=" + aiItemCount)	if (akBaseItem == Dawnbreaker) && (GetOwningQuest().GetStageDone(15) == 0) && (AaVamphunterDialogueFollower.GetStage() == 20)		GetOwningQuest().SetStage(15)		elseif (akBaseItem == Dawnbreaker) && (GetOwningQuest().GetStageDone(15) == 0) && (AaVampHunterDialogueFollower.GetStage() == 10)			GetOwningQuest().SetStage(9)		EndIfEndEvent

Which returns this error error:
Spoiler
None is not a valid inventory item
stack:
[ (00000014)].Actor.GetItemCount() - "" Line ?
[AaVampHunterDawnBreaker01 (0400CE10)].QF_AaVampHunterDawnBreaker01_0500CE10.Fragment_29() - "QF_AaVampHunterDawnBreaker01_0500CE10.psc" Line 72
[12/14/2012 - 04:28:43PM] error: None is not a valid inventory item
stack:
[ (00000014)].Actor.GetItemCount() - "" Line ?
[AaVampHunterDawnBreaker01 (0400CE10)].QF_AaVampHunterDawnBreaker01_0500CE10.Fragment_29() - "QF_AaVampHunterDawnBreaker01_0500CE10.psc" Line 74

The reason I tried this script was because of a line in the logs which looks like this BYOHHouseBuildingPlayerScript ]OnItemAdded [WEAPON < (0004E4EE)>], itemCount=1" which made me realize that I must be doing something wrong if that script can recognize when mine couldn't so now I'm here after having searched all around. Any help?

2 other things I need some help with is:
1. The ForceGreet Package I have set up to go off when the conditions is met and the follower "notice" the Dawnbreaker, gives me an error and I have no idea why because it's a complete copy of MS01GuardThreatenScene (Which isn't actually a scene) except for the markers, conditions and topic, of course.
Spoiler
;BEGIN FRAGMENT Fragment_19Function Fragment_19();BEGIN CODE;Forcegreet playerAlias_HunterRef.GetActorRef().EvaluatePackage()

error: Cannot call EvaluatePackage() on a None object, aborting function call
stack:
[AaVampHunterDawnBreaker01 (0400CE10)].QF_AaVampHunterDawnBreaker01_0500CE10.Fragment_19() - "QF_AaVampHunterDawnBreaker01_0500CE10.psc" Line 50
I know the HunterRef isn't a non object. It's a Quest Alias which has Unique Actor set to the new follower.

2. When I do a RefQuest.Start() RefQuest.SetStage(15) it does neither, unless the quest is Game Start Enabled. Any ideas on that?.

Long post, I know. Sorry about that.

I hope someone can clarify for me if possible and I haven't overlooked the simple easy and straight forward solution =)

Take care.
User avatar
Latisha Fry
 
Posts: 3399
Joined: Sat Jun 24, 2006 6:42 am

Return to V - Skyrim