Help with a Trophy Display Room?

Post » Sat Jan 31, 2015 3:28 am

I've been trying to make a display room for unique items you can aquire but I have a few questions about how to improve it. I've been using static versions of the items and a script like this:

-----------------

Scriptname DragonClawHolderScript extends ObjectReference

MiscObject Property ClawToPlace Auto
{The claw we want to place}
Bool Property isPlaced = false Auto Hidden
Message Property FailMessage auto
{The message to show if the player dont have the claw in their inventory}

Event OnActivate(ObjectReference akActivator)
if(isPlaced == FALSE) ; is the claw placed?
if akActivator.getItemCount(ClawToPlace) >= 1 ; Does the player have the claw?
isPlaced = TRUE
self.getLinkedRef().enable() ; Enable the Static Claw
(akActivator as actor).removeItem(ClawToPlace, 1) ; Remove the claw from the players inventory
else
FailMessage.show() ; If the player doesnt have the claw, show the Fail message.
endif
else
isPlaced = FALSE
self.getLinkedRef().disable() ; If the claw was already placed, disable the static claw
(akActivator as actor).addItem(ClawToPlace, 1) ; add the claw back.
endif
endEvent

------------

This works well enough but I've needed a separate script version for each object type like weapons, armor, soulgems, books, miscobjects.

Is there a way to only have one script for all the object types?

I've also made a separate named activatior for each specific item I wanted displayed?

Is there a way around that to only use one?

There is also a Dragonpriest mask that has 6 separate versions.

I can make a version of my script with a bunch of ifelse's to cover each possibility but it seems sort of messy.

I haven't used formlists at all (very new to scripting) but would putting all the varients in a formlist help compress the messy script? And how would you phrase it?

Last question. I would like to display the items that show up in the Thieve's Guild after completing various of their quests in my home. I've looked in the CK at the items in Riftens Thieves Guild and the items in the bookcase are listed as somethingRef. Are those items takeable by my player? And if they are how would I refer to them to check if my player has them and to add and remove them from his inventory?

If they are not takeable would it be possible to enable the static in my home each time the one in the thieves guild is enabled? I don't want to mess up any of the quests by accident.

User avatar
Romy Welsch
 
Posts: 3329
Joined: Wed Apr 25, 2007 10:36 pm

Return to V - Skyrim