Can someone help me real quick with this script...

Post » Mon Dec 29, 2014 8:43 am

The script from Terra Nova

Scriptname CheckForFaction extends ObjectReference
Faction property ThievesGuildFaction auto
; make sure to fill this with the faction
Event OnLoad()
if !Game.GetPlayer().IsInFaction(ThievesGuildFaction)
BlockActivation(true)
else
BlockActivation(false)
endif
EndEvent
now i put this on an extra door to the thieve's guild and it wont activate if im not a thieve's guild member however when i become a thieve's guild member it still doesnt activate...can anyone help?
User avatar
TASTY TRACY
 
Posts: 3282
Joined: Thu Jun 22, 2006 7:11 pm

Post » Mon Dec 29, 2014 12:30 pm

It helps to put Debug messages in your script to figure out what may be the problem.

E.g.

Event OnLoad()    if !Game.GetPlayer().IsInFaction(ThievesGuildFaction)        BlockActivation(true)        Debug.MessageBox("The player is NOT in the faction")    else        BlockActivation(false)        Debug.MessageBox("The player is in the faction, unlocking door")    endifEndEvent

If the first message comes up, then the player actually isn't in the faction, or the property isn't filled correctly.

If the second message comes up and the door is still inactive, then I have no idea.

If neither message comes up, then the script itself just isn't firing. There are some notes here for the OnLoad so it may not always be firing when you want it to (http://www.creationkit.com/OnLoad_-_ObjectReference). OnCellAttach could be an alternative event to try. Also, neither of those events will fire to unlock the door if the door is loaded/player is in the cell when they join the Thieves Guild. They will have to leave the area, and then come back.

User avatar
Steve Fallon
 
Posts: 3503
Joined: Thu Aug 23, 2007 12:29 am

Post » Mon Dec 29, 2014 1:18 pm

Hey thanks alot man,i added your debug messages and started a new game and it worked perfectly....now onto script 2.

User avatar
Gemma Archer
 
Posts: 3492
Joined: Sun Jul 16, 2006 12:02 am


Return to V - Skyrim